Translation and localization
A typical LLM translation setup uses a low-cost chat model with steady language quality to translate paragraph by paragraph, keeps a glossary fixed in the system prompt, and sends important pages to a stronger model for review. For about 4 million Chinese characters a month, at live prices in each model’s cheapest group, model costs are about ¥96.8 a month.
Prices updated Nov 12, 2026, 8:17 PM|
01
The business problem
Companies selling abroad need product pages, help docs, app UI and marketing email in several languages, and the content changes often. Human translation is slow, and traditional machine translation is inconsistent with terminology.
LLMs understand context and read more naturally, but a whole long document in one request tends to lose paragraphs, change formatting, and translate the same term differently in different places.
In practice you fix the glossary and style rules in the system prompt, split long documents into paragraphs, keep Markdown and placeholders untouched, and review according to how important each piece is.
02
Recommended models
Paragraph translation (chat model)
deepseek-v4.1-flashDeepSeekinput ¥2.8 / output ¥11.2 per 1M tokens· China Models groupCarries all of the volume, so pick a model with a low price and steady quality in your target languages. Every request carries the same glossary and style notes; on models with context caching, that repeated prefix is billed at the lower cache price when it hits.
Review and polish (stronger model)
Claude Sonnet 5.5Anthropicinput ¥3.2 / output ¥16 per 1M tokens· Claude Lite groupFor landing pages, contract terms and app-store copy, a stronger model compares translation and source, flags omissions, mistranslations and wrong terms, and rewrites where needed.
Recommended models are picked from the live catalog; prices are each model's cheapest group, updated Nov 12, 2026, 8:17 PM. Click a model to see every group's price.
03
Reference architecture
- 1
Build the glossary
List brand names, feature names and fixed phrases with their translations, plus tone rules (formal or casual, how to address the reader), and put them in the system prompt.
- 2
Split the source
Split by paragraph into pieces of roughly 1,000 to 2,000 characters; leave code, links and variable placeholders as they are.
- 3
Translate piece by piece
One request per piece with a low temperature; keep the order and retry failed pieces individually.
- 4
Check in code
Compare paragraph counts, numbers, links and placeholders between source and translation; retranslate pieces that do not match.
- 5
Review a sample
Send important pages to the stronger model or a native speaker, and add new terms found in review to the glossary.
04
Cost estimate
Assumptions: about 4 million Chinese characters a month in 5,000 requests; each request has about 2,000 input tokens (1,200 for the glossary and style notes, 800 for the source) and about 1,000 output tokens; 10% (500 pieces) are reviewed by a stronger model at about 3,000 input and 1,000 output tokens each.
| Item | Model | Usage assumed | Cost |
|---|---|---|---|
| Paragraph translation | deepseek-v4.1-flash | 5,000 × (2,000 input + 1,000 output tokens) | ¥84 |
| Review of key content | Claude Sonnet 5.5 | 500 × (3,000 input + 1,000 output tokens) | ¥12.8 |
| Total (per month) | ¥96.8 | ||
Calculated from live prices in each model's cheapest group, updated Nov 12, 2026, 8:17 PM.
Model usage only. Context caching is not counted: on models that support it, a fixed prefix such as the glossary is billed at the cache-read price when it hits, so the real bill may be lower. Each extra target language multiplies the cost.
05
Sample code
The glossary and style rules sit in the system prompt; the source is split on blank lines, translated piece by piece and joined back in order.
import os
from openai import OpenAI
client = OpenAI(base_url="https://open.tutujin.com/v1", api_key=os.environ["TUTUJIN_API_KEY"])
GLOSSARY = {"土土金 API": "Tutujin API", "分组": "group", "用量明细": "Usage"}
SYSTEM = (
"Translate Simplified Chinese into natural English for a software product. "
"Keep Markdown, numbers, code, URLs and placeholders such as %s unchanged. "
"Always use these term translations:\n"
+ "\n".join(k + " => " + v for k, v in GLOSSARY.items())
)
def chunks(text, limit=1500):
"""Split on blank lines so every request stays small and paragraphs stay whole."""
part = ""
for para in text.split("\n\n"):
if part and len(part) + len(para) > limit:
yield part
part = ""
part = part + "\n\n" + para if part else para
if part:
yield part
def translate(text):
out = []
for piece in chunks(text):
resp = client.chat.completions.create(
model="deepseek-v4.1-flash",
messages=[
{"role": "system", "content": SYSTEM}, # identical prefix on every call
{"role": "user", "content": piece},
],
temperature=0.2,
)
out.append(resp.choices[0].message.content)
return "\n\n".join(out)
with open("article.zh.md", encoding="utf-8") as f:
print(translate(f.read()))
# Important pages: send source and translation to claude-sonnet-5-5 and ask it to flag omissions and wrong terms.FAQ
What does translating 4 million characters a month cost?
At about 2,000 input and 1,000 output tokens per request, 5,000 requests, plus a 10% review, the cheapest groups come to about ¥96.8 a month. Multiply by the number of target languages.
How do I keep terminology consistent?
Put the glossary in the system prompt of every request, then check in code that each glossary term appears with the required translation and retranslate pieces where it does not.
Why translate long documents in pieces?
With too much text in one request, models are more likely to drop paragraphs or change formatting, and the output can hit its length limit and get cut off. In pieces, a failure only means retrying one small piece.
Is LLM translation as good as a human translator?
It varies a lot by language pair and domain, so there is no general answer. Compare a few models on representative content first, then decide what can be published directly and what needs human review.
Is a long glossary expensive?
The glossary is sent with every request and counts as input tokens. Include only the entries the current content needs; on models with context caching, an unchanged prefix is billed at a lower price when it hits the cache.