Translate Your Website and App with AI: A Practical Workflow
Translate websites, apps and help articles with AI: a glossary, safe code and placeholders, a model per language, review and cost.

AI models translate well enough that a small team can now ship a product in five languages. Doing it well takes more than "translate this": your product names must stay put, placeholders must survive, and the tone must match. This is the workflow we use for this site, which is published in English, Vietnamese, Spanish, Portuguese and Indonesian.
1. Write a glossary first
Before translating a word, write down the terms that must be handled the same way every time:
- Keep in English: product names, model names, "API key", code, command names.
- Fixed translations: your menu items and button labels, so a help article says the same as the screen. If the menu says "Usage" in English and "Penggunaan" in Indonesian, every article should too.
- Tone: formal or informal address, and how to write prices and dates for each market.
Put the glossary in the system prompt. It is the single biggest improvement you can make to the output.
2. Protect what must not change
Interface text is full of things a translator must leave alone: {name} placeholders, HTML tags, Markdown links, code. Tell the model, and check afterwards:
SYSTEM = """You translate interface text from English to {lang}.
Rules:
- Keep {{placeholders}}, HTML tags, Markdown links and `code` exactly as they are.
- Keep these terms in English: API Store, API key, Seedance, Claude, GPT, Gemini.
- Use these translations: Usage -> {usage}, Billing -> {billing}.
- Answer with the translation only."""After translating, compare the placeholders in the source and the result with a few lines of code. A missing {name} or a broken link is the most common real bug in machine translation, and the easiest to catch automatically.
3. Send structured text, get structured text back
For an app's strings, send JSON and ask for the same keys back with a JSON schema. For articles, send Markdown and ask for Markdown. Translate in batches of related strings, not one by one: the model translates better when it sees "Save" next to "Cancel" and "Delete".
4. Choose a model per language
Models differ by language, and the only reliable way to choose is a test:
- Pick 30 typical strings or two typical articles.
- Translate them with two or three models, for example
claude-sonnet-5-5,gpt-6.2-solandgemini-3.8-flash. - Ask a native speaker to rank the results without telling them which model made which.
Use the winner for that language. For high volume, also try a low-priced model like gemini-3.1-flash-lite, then have a stronger model review its output.
5. Review
For anything customers read, plan a review pass:
- Automatic checks for placeholders, links, length (buttons that grow 40% break layouts) and terms from the glossary.
- A second model as reviewer: send the source and the translation and ask for a list of errors, not a new translation.
- A native speaker for your landing page, pricing and legal text. They can work much faster correcting a good draft than translating from scratch.
What it costs
Translation output is about as long as the input, so both prices matter:
cost ≈ words × 1.4 tokens per word × (input price + output price) ÷ 1,000,000
Other languages often take more tokens than English for the same text, so measure from a real batch. As an example, a 1,500-word article is roughly 2,000 tokens in and somewhat more out. On Claude Sonnet 5.5 that is priced at $1.4 per million input tokens and $7 per million output tokens; on Gemini 3.8 Flash at $0.525 and $2.63. Either way, a full article in four languages costs far less than an hour of a translator's time, which is why the review pass is where to spend.
Keep the system prompt with the glossary identical across requests, so it is read from cache at the lower cached price.
Keep it up to date
Translate changes, not whole files. Store which version of the English each translation came from, and when the English changes, send only the changed strings with the old translation for context. Your glossary grows as you go: every correction a reviewer makes twice belongs in it.
Also in Tiếng Việt, Español, Português, Bahasa Indonesia



