AIAgentIndex
← All use cases
Product

Docs and UI string localization

When English docs or UI strings change, the agent translates the diff into your target languages using a glossary, and opens a PR for native-speaker review.

Who it's for and the problem it solves

For product and engineering teams that ship in more than one language and keep falling behind on translations. Re-translating whole files is slow and expensive, and inconsistent terminology confuses users. This agent translates only what changed, uses your glossary, and leaves the final say to a native speaker in a pull request.

ProductLocalization

Tools

How to set it up

  1. 1Keep source strings in a predictable place in GitHub, such as locale files (en.json, messages.po) and a docs folder in Markdown, with one file per language.
  2. 2Create a DeepL glossary for each target language with product names, feature names and terms that must never be translated. Keep the source of truth in the repo.
  3. 3Add a GitHub Action (or agent trigger) that runs when English strings or docs change on the main branch and computes the diff of new and changed keys or paragraphs.
  4. 4Send only the changed text to the DeepL API with the glossary, preserving placeholders like {name}, %s and HTML or Markdown formatting.
  5. 5Validate the output: placeholders unchanged, valid JSON or PO syntax, no empty strings, and length warnings for UI strings that might overflow buttons.
  6. 6Open one pull request per language with the translated diff, labeled for review and assigned to that language's reviewer.
  7. 7Merge only after a native or fluent speaker approves, and add their recurring corrections to the glossary.

Example agent instructions

Copy, paste and adapt. Replace anything in {braces} with your own details.

You maintain translations for {Product}.
When English source files change:
1. Diff against the last translated commit. Collect only new or modified keys and paragraphs. Never re-translate unchanged text.
2. Translate each item into {languages} with DeepL and the language's glossary.
3. Preserve exactly: placeholders ({var}, %s, %d), HTML tags, Markdown links, code blocks and product names on the do-not-translate list.
4. Validate file syntax, and flag any UI string whose translation is more than 40% longer than the English.
5. Open one PR per language titled "i18n({lang}): {N} updated strings", listing each key with its English source and the translation, and noting any validation warnings.
6. Never merge. Request review from the reviewer for that language.

Guardrails and human checkpoints

Example input and output

Illustrative example only, not real customer data.

Example input

Example diff: en.json adds "export.button": "Export {count} files" and changes the docs paragraph about workspace limits.

Example output

Example PR for German (illustrative): Title: i18n(de): 2 updated strings - export.button: "Export {count} files" → "{count} Dateien exportieren" (placeholder preserved) - docs/workspaces.md, paragraph 3: translated with glossary term "Workspace" kept as-is Warnings: none

What to measure

FAQ

Why DeepL instead of a general chatbot?

DeepL has a translation API with glossary support, which keeps terminology consistent. You can swap in another model, but keep the glossary and validation steps.

Do we still need translators?

Yes, as reviewers. The agent removes the blank-page work, and fluent people make sure it reads naturally and correctly.

How do we handle plurals and gender?

Use your i18n library's plural and select formats (for example ICU MessageFormat) in the source, and validate that the translation keeps that structure.

Related use cases

Get new agent playbooks by email

AgentIndex Pro

Weekly launch alerts for new agent use cases. Advanced search and early access are coming soon. What's included