Localizing Nested JSON Locale Files Without Losing Structure

2026-10-16来源 dev.to WebDevEnglish

Large locale files are usually grouped by feature, screen, or domain. The problem is not translating the values. The problem is preserving a predictable file shape so developers can diff, merge, and validate changes safely.

Recommended workflow

  • Keep one source locale as the canonical file for structure changes.
  • Translate after key additions are settled, not while the file shape is still moving daily.
  • Review output by feature area so checkout, onboarding, and settings can be signed off separately.
  • Validate the translated JSON with schema checks or app-level smoke tests before merge.

What makes review faster

Diff-friendly output matters more than perfect first-pass translation quality. If engineers can quickly verify that keys, nesting, and protected language survived, the team can iterate on wording without fighting broken JSON.

For a translator that keeps keys, nesting and placeholders intact, try JSON Translate. To catch broken placeholders or missing keys in CI, there's the free @json-translate/check CLI.

Originally published on the JSON Translate blog.

原文:https://www.a8q9.cn/en/article/localizing-nested-json-locale-files-without-losing-structure-839029.html

相关文章