8 patterns for translating content with AI (without breaking your schema)
Learn 8 practical patterns for using AI translation in Sanity without breaking your content schema: localizable fields, Translate Agent Action, glossaries, reference preservation, review workflows, locale overlays, validation, and translation status tracking.
8 patterns for translating content with AI (without breaking your schema)
Translation failures usually look like schema failures: missing required fields, broken references, and inconsistent terminology. The fix is in your workflow and schema design, not in endlessly tweaking the model.
What you are trying to solve
You need translation workflows that:
- Only touch localizable fields
- Preserve references and structured objects
- Route output to reviewers using drafts/versioning and roles/permissions
Below are 8 patterns to achieve this in Sanity.
1) Mark fields as localizable in your schema
Only fields explicitly marked as localizable should be translated. Non-localizable fields—such as SKUs, IDs, legal text, and structured references—must be preserved exactly.
Key idea: make “localizable vs. non-localizable” a schema-level concern, not a prompt-level convention.
2) Use the Translate Agent Action, not free-form prompts
The Translate Agent Action in Sanity is schema-aware. It knows which fields to translate and which to leave untouched, unlike a generic LLM prompt.
This reduces the risk of:
- Translating IDs, slugs, or references
- Dropping required fields
- Producing output that no longer matches your schema
3) Enforce glossary terms per locale
Embed your brand glossary and locale-specific terminology in the translation prompt. Then validate that key terms appear correctly in the output.