When to use it
You're localizing an app or a site: you have strings with variables ({count}, %s), buttons with length limits, and terms that can't be translated any old way. The AI's role is a product localization translator. Output: a translation that won't break the interface (placeholders intact), sticks to your terminology and sounds natural to the target audience.
The prompt (copy and paste)
You are a software localizer. Translate the UI strings from <SOURCE LANGUAGE> into <TARGET LANGUAGE>.
PRODUCT AND AUDIENCE: <what the product is, who it's for, formality — informal/formal address>.
TONE: <e.g. friendly and concise, like modern SaaS>.
GLOSSARY (translate EXACTLY like this; don't change brands/terms from the list):
- <term> → <translation or "do not translate">
Rules:
1. Keep placeholders and tags ({name}, %s, <b></b>, \n) UNCHANGED and in the correct position.
2. Follow the glossary to the letter. For buttons/labels keep the length close to the original (the UI is tight).
3. Respect number/gender/case in the target language (plurals, forms after numerals).
4. Don't translate code, keys or URLs. Adapt line breaks and punctuation to the language.
5. If a string is ambiguous without context — translate the most likely reading and flag it [?] for review.
Format: return a table "key | original | translation | note". Keep the keys as they are.
The technique: translation constrained by a glossary and a tone, plus hard protection for placeholders — the standard for product localization; the model adapts the language's forms but doesn't touch anything that would break the build.
Filled-in example
EN→RU, SaaS, formal address, friendly. Glossary: Dashboard → "Панель", Workspace → "Рабочее пространство". Strings: welcome_msg = "Welcome back, {name}!", items_count = "You have {n} items".
What the AI should come back with: a table — welcome_msg | Welcome back, {name}! | С возвращением, {name}! | placeholder preserved; items_count | You have {n} items | У вас {n} элемент(а/ов) | needs pluralization: 1 элемент / 2 элемента / 5 элементов. Note: enable ICU pluralization for RU.
Variations
- Review only (QA). "Here's the original and the translation — find glossary mismatches, lost placeholders and unnatural phrasing."
- Cultural adaptation. "Adapt examples, currency, units and idioms to
instead of translating literally" — for marketing strings. - Back-translation. "Translate it back into the source language so I can check the meaning" — quality control when you don't speak the target language.
Pro tips
- Protecting placeholders and tags is priority number one: a lost
{name}or a swallowed%sbreaks the interface. Ask for it explicitly and verify every variable is still there. - Give a short but real glossary (brands, key terms, what NOT to translate) — nothing raises consistency more; you don't need to dump the whole dictionary, focus on the ambiguous bits.
- Pluralization and cases are the main pain in Russian and other morphologically rich languages: don't ship "1 элементов". Ask for correct forms and build ICU/plural rules into the code side.