## I
I. First, My Failures: Approaches That Looked Smart
Failed Approach #1: Dumping the Entire Language File to AI
My initial approach was: open zh_CN.json, select all, copy, paste into the chat, and attach the message "Translate this into English, Japanese, German, and Spanish."
The results looked fine at first glance, but were riddled with pitfalls on closer inspection:
- "设置" was translated as "Settings," but the "设" in "设为默认" got translated separately as "Set up";
- The language file also contained regex notes and placeholders like
{count}, and the AI translated{count}into{数量}, causing the placeholder substitution to throw errors at runtime; - Across thirty-plus language packs, the same word "同步" appeared as three different translations in different files: "Sync," "Synchronize," and "Synchronization."
Failed Approach #2: One Conversation Per Language, Each Doing Its Own Thing
The second time I got a bit smarter and opened a separate conversation for each language. It turned out even worse: the AI in each conversation was "improvising freely," and terminology consistency completely collapsed. The English version said "Bookmark Manager," the German version was a literal translation, "Lesezeichen-Verwalter" (the kind that makes native speakers frown), and the Japanese version was simply a pile of katakana loanwords.
Failed Approach #3: Not Telling AI It's a Browser Extension
Without context, the AI translates as "generic software." For example, "扩展" in a generic context was translated as "Extension of file" (file extension), whereas in the browser extension context it should be "Browser Extension." The menu item "后退" was translated as "Retreat"—that's military terminology.
Three failures taught me: when batch-generating multilingual UI copy, the problem isn't translation capability—it's insufficient constraints.
II. The Right Approach: Treat AI as a "Localization Engineer with a Glossary"
Step 1: Prepare a "Translation Material Package"
Don't dump raw JSON. Do three things first:
- Extract pure copy: Separate keys and values, and only let AI process the values;
- Annotate context: Tag each string with where it appears (menu/button/notification/error message);
- Build a glossary: For the extension's core concepts (e.g., "Bookmark," "Sync," "Tag Group"), define standard translations for each language yourself first, or have AI generate a glossary and confirm it manually before use.
Step 2: Feed in Batches with Structured Prompts
Process only one target language at a time; if the volume is large, split it into batches (no more than 50 items per batch), and always carry the same glossary. This is the key to consistency.
Step 3: Use JSON Schema-Style Output + Programmatic Validation
Require AI to output strict JSON, then run a simple script on the results: check whether all keys are present, whether placeholders like {xxx} are preserved, and whether there are extraneous translations. Let the program do the mechanical checks, with humans only spot-checking semantics.
III. A Reusable Prompt Template
你是一名专业的软件本地化工程师,正在为Chrome浏览器插件翻译界面文案。
## 背景
- 产品类型:书签管理类浏览器插件
- 目标语言:{目标语言,如:日语}
- 文案风格:简洁、正式,符合该语言母语用户的软件界面习惯
## 术语表(必须严格遵守,不得改写)
- Sync -> {对应译法}
- Bookmark -> {对应译法}
- Group -> {对应译法}
## 翻译规则
1. 严格保留占位符,如 {count}、{name},不得翻译或改动
2. 保留HTML标签如 <b>、<br>
3. 按钮文案控制在2个词以内,提示文案不超过原文字符数的1.5倍
4. "Extension"指浏览器扩展,不是文件后缀
5. 不要逐字直译,优先采用该语言软件界面的惯用表达
## 输出格式
仅输出JSON,不要任何解释:
{"key1":"译文1","key2":"译文2"}
## 待翻译文案(含上下文标注)
{这里粘贴 key + 原文 + 位置标注}Save this template, and each time just swap in the target language, glossary, and batch of copy, then loop through all languages. Combined with a script validating placeholders and key completeness, you can achieve essentially zero rework.
IV. Before and After Using AI
| Dimension | Traditional Approach (DIY/Translation Platform) | Constrained AI Workflow |
|---|---|---|
| Time cost | 3-5 days for 8 languages | Half a day for all language packs |
| Cost | Translation platforms charge by word count; gets expensive at scale | Only API call costs, usually less than a meal |
| Terminology consistency | Relies on manual maintenance, prone to drift | Glossary force-injected, consistent throughout |
| Placeholder safety | Humans can also make mistakes | Programmatic validation as a safety net, errors caught immediately |
| Future iterations | New copy requires redoing the whole process | Reuse the same template, run as soon as added |
The most valuable part actually isn't "speed," but workflow reusability: every time the extension update adds new copy, I just stuff the new entries into the same template and can fill in 8 languages within ten minutes.
V. A Few Tips
- Don't skip the glossary. Spending 20 minutes upfront finalizing terminology with AI saves hours of rework later;
- Always spot-check less common languages. Major languages like English, Japanese, and German have stable quality, but for niche languages, find native speakers or cross-validate with another model;
- Use the API, not the web chat. For batch scenarios, only the API enables scripting, and you can also set a low temperature parameter to reduce "improvisation."
If you also want to script this workflow and need a stable AI API channel that supports switching between multiple models, you can try https://api.thistoken.ai/register — ready to use upon registration, and multilingual batch tasks run very smoothly.
---
Tired of juggling provider integrations? Register at https://api.thistoken.ai/register and call every model through one base_url.
Vous voulez essayer Token.AI ?
Créez une API Key au niveau du projet, activez les canaux dans la console et configurez le routage, les budgets et les journaux d'audit.
注册 ThisToken.AI 并获取 API Key