Claude translates well out of the box; the pipeline exists to make translations consistent (terminology), checkable (QA scores), and affordable (caching and batching). All the model-facing pieces here use core Messages API features available on all four 3P platforms, so this pattern is unusually portable — with the batch and caching caveats flagged below.
Segment, but carry context
Translate at the segment level — paragraphs or UI strings, each with a stable ID — so results are diffable, cacheable, and re-translatable one at a time when the source changes. The recommended prompt shape sends the segment plus surrounding context (the previous and next segments, the document's register), following Anthropic's structured-prompting guidance: wrap the glossary, context, and segment in their own XML tags so instructions and data can't blur. Segments in isolation produce the classic machine-translation failure of pronouns and formality drifting between sentences; that fix is architectural, not a model setting.
The glossary is a cached prefix
Terminology consistency comes from injecting an approved glossary (source term → required target term, plus do-not-translate lists for product names) into every request's system prompt. That makes the glossary the textbook prompt-caching candidate: mark it with cache_control and every subsequent segment pays 0.1x base input price to read it instead of full price. Documented mechanics that shape the design:
- Minimum cacheable prompt length is model-specific — 512 tokens on Fable 5, 1,024 on Opus 4.8 / Sonnet 5 / Haiku 4.5 — so a tiny glossary may silently not cache; pad it with your standing translation instructions, which belong in the prefix anyway.
- Caching is a strict prefix match: keep the glossary byte-stable (sorted keys, no timestamps) or every request re-writes the cache at 1.25x.
- The cache hierarchy runs tools → system → messages, so a glossary in the system prompt survives changing segments below it.
- Platform note: prompt caching works on the Claude API, Claude Platform on AWS, Google Cloud, and Foundry; Bedrock supports explicit breakpoints only (no automatic caching).
One budgeting caveat: don't estimate non-English token counts by eye or with other vendors' tokenizers — the free count_tokens endpoint is the documented way to measure, and OpenAI's tiktoken undercounts Claude tokens, worse on non-English text.
QA scoring: judge per segment, gate in code
A second model call scores each translated segment against a rubric — accuracy, glossary compliance, register — returning a schema-constrained verdict via structured outputs (generally available on the Claude API, Claude Platform on AWS, Bedrock, and Vertex AI; beta on Foundry). Keep the deterministic checks out of the model entirely: glossary-term presence, placeholder integrity ({user_name} survived), markup balance, and length ratios are string operations in code. The judge handles only what code can't — is it faithful, does it read naturally. Schema limits apply as everywhere: no numeric minimum/maximum constraints, so validate score ranges in code, and treat stop_reason: "refusal" (an HTTP 200) as an automatic review-lane result.
The human review gate
Route each segment by QA score plus deterministic-check results into three lanes — publish, review, or retranslate-with-feedback (one automatic retry that includes the judge's notes, then a human). Two recommended dials: content tier (legal and marketing copy get lower auto-publish thresholds than internal docs) and language maturity (new language pairs start at 100% review and earn autonomy as reviewer-edit rates fall). Feed reviewer corrections back into the glossary and the judge rubric — that loop, not the model, is where quality compounds.
Bulk runs and cost
Initial localization of a large corpus is batch work: the Message Batches API runs it at 50% of standard prices on the Claude API and Claude Platform on AWS (not available on Bedrock, Vertex AI, or Foundry — Bedrock and Vertex offer their own cloud-native batch inference for Claude instead). Because batches can run longer than 5 minutes, the docs recommend the 1-hour cache TTL for the shared glossary prefix. Ongoing incremental translation typically runs real-time on a mid-tier model, with tiering reserving the strongest models for high-stakes content.
Where to go next
See translation and localization for the use-case overview, evals in CI for regression-testing your glossary and prompts, and multilingual prompting for language-specific prompt design.