Localization (l10n) (Deep Workflow)
Localization is engineering + content + QA—not “send strings to translators.” Plan for concatenation, plural/gender, context, and layout early to avoid expensive rework.
When to Offer This Workflow
Trigger conditions:
- - New markets/languages; translation backlog
- Broken plurals, overflow, RTL layout bugs
- Date/currency errors; sort order issues
Initial offer:
Use six stages: (1) strategy & scope, (2) extraction & keys, (3) ICU & placeholders, (4) formatting & locale data, (5) layout & RTL, (6) QA & launch process. Confirm TMS (Phrase, Lokalise, etc.) and release cadence.
Stage 1: Strategy & Scope
Goal: Which locales, what ships together, quality bar.
Decisions
- - Locale list vs language only; regional variants (pt-BR vs pt-PT)
- Tier: full UI vs partial; legal must-have strings
- Fallback chain:
es-MX → es → INLINECODE2
Exit condition: Scope document and priority locales for launch.
Stage 2: Extraction & Keys
Goal: Stable keys, developer context for translators.
Practices
- - No string concatenation across translations—one message id per sentence
- Descriptions for translators: where shown, max length hint if UI constrained
- Namespaces per feature; avoid reusing ambiguous English in multiple keys
Workflow
- - Freeze strings for release branches; diff notifications for late changes
Exit condition: Naming convention for keys; PR checklist for new strings.
Stage 3: ICU & Placeholders
Goal: Grammatically correct in all target languages.
Patterns
- - Plural, select, ordinal rules via ICU MessageFormat (or platform equivalent)
- Variables named (
{userName}), reordered per locale rules—never positional %s soup for user-visible text
Pitfalls
- - Nested plurals; gender agreement languages—linguist review when needed
Exit condition: Lint or test that parses ICU per message.
Stage 4: Formatting & Locale Data
Goal: Numbers, dates, currency, units follow locale—not manual strings.
Practices
- - Intl APIs (JS), babel / ICU (other stacks); timezone policy explicit (UTC vs user local)
- First day of week, calendars where relevant
Exit condition: Golden tests for format snapshots per locale sample.
Stage 5: Layout & RTL
Goal: UI works in long translations and RTL.
Practices
- - Flexible layouts; truncate with tooltip only when necessary—German expands
- RTL: mirror icons/direction; bidirectional text in mixed content
- Vertical space for CJK line breaks when needed
Exit condition: Visual QA checklist per template; screenshots in worst-case language often de or fi for length stress.
Stage 6: QA & Launch
Goal: Linguistic + functional QA before traffic.
Process
- - Pseudo-localization in CI: expand strings, accent—catches truncation early
- In-context review (on-device) when possible
- Smoke tests per locale on critical paths post-deploy
Final Review Checklist
- - [ ] Locale scope and fallbacks defined
- [ ] Keys and translator context disciplined
- [ ] ICU for plurals/gender; no unsafe concatenation
- [ ] Intl formatting for numbers/dates/currency
- [ ] RTL and long-string layout verified
- [ ] QA process for each release train
Tips for Effective Guidance
- - Concatenation is the #1 source of untranslatable bugs.
- English plural ≠ other languages—always use ICU.
- Legal copy may need jurisdiction review—flag early.
Handling Deviations
- - Single extra language: still use ICU and Intl—habits scale.
- Community translations: glossary and style guide critical.
本地化(l10n)(深度工作流)
本地化是工程 + 内容 + 质量保证——而非“将字符串发送给翻译人员”。尽早规划字符串拼接、复数/性别、上下文和布局,以避免代价高昂的返工。
何时提供此工作流
触发条件:
- - 新市场/语言;翻译积压
- 损坏的复数、溢出、从右到左布局错误
- 日期/货币错误;排序顺序问题
初始提供:
使用六个阶段:(1) 策略与范围,(2) 提取与键,(3) ICU与占位符,(4) 格式化与区域数据,(5) 布局与RTL,(6) 质量保证与发布流程。确认翻译管理系统(Phrase、Lokalise等)和发布节奏。
阶段1:策略与范围
目标: 哪些区域设置、什么一起发布、质量标准。
决策
- - 区域设置列表 vs 仅语言;区域变体(pt-BR vs pt-PT)
- 层级:完整UI vs 部分;法律 必需字符串
- 回退链:es-MX → es → en
退出条件: 范围文档和优先区域设置用于发布。
阶段2:提取与键
目标: 稳定的键,为翻译人员提供开发者上下文。
实践
- - 不跨翻译进行字符串拼接——每个句子一个消息ID
- 为翻译人员提供描述:在哪里显示,如果UI受限则提示最大长度
- 按功能命名空间;避免在多个键中重用有歧义的英文
工作流
退出条件: 键的命名约定;新字符串的PR检查清单。
阶段3:ICU与占位符
目标: 在所有目标语言中实现语法正确。
模式
- - 通过ICU MessageFormat(或平台等效)实现复数、选择、序数规则
- 变量命名({userName}),按区域规则重新排序——用户可见文本绝不使用位置 %s 混乱
陷阱
- - 嵌套复数;性别一致语言——必要时进行语言学家审查
退出条件: 检查或测试每个消息的ICU解析。
阶段4:格式化与区域数据
目标: 数字、日期、货币、单位遵循区域设置——而非手动字符串。
实践
- - 国际化API(JS)、babel / ICU(其他技术栈);时区策略明确(UTC vs 用户本地)
- 相关情况下的每周第一天、日历
退出条件: 每个区域设置样本的格式快照的黄金测试。
阶段5:布局与RTL
目标: UI在长翻译和RTL中正常工作。
实践
- - 灵活布局;仅在必要时使用工具提示进行截断——德语会扩展
- RTL:镜像图标/方向;混合内容中的双向文本
- 必要时为中日韩换行预留垂直空间
退出条件: 每个模板的视觉质量检查清单;最坏情况语言的截图,通常de或fi用于长度压力测试。
阶段6:质量保证与发布
目标: 在上线前进行语言 + 功能质量保证。
流程
- - CI中的伪本地化:扩展字符串、添加变音符号——早期发现截断问题
- 尽可能进行上下文内审查(在设备上)
- 部署后对关键路径进行每个区域设置的冒烟测试
最终审查检查清单
- - [ ] 区域设置范围和回退已定义
- [ ] 键和翻译人员上下文已规范
- [ ] 复数/性别的ICU;无危险的拼接
- [ ] 数字/日期/货币的国际化格式化
- [ ] RTL和长字符串布局已验证
- [ ] 每个发布版本的质量保证流程
有效指导技巧
- - 字符串拼接是不可翻译错误的首要来源。
- 英文 复数 ≠ 其他语言——始终使用ICU。
- 法律文案可能需要司法管辖区审查——尽早标记。
处理偏差
- - 单一额外语言:仍使用ICU和国际化——习惯可扩展。
- 社区翻译:术语表和风格指南 至关重要。