JSON i18n Key Manager
Analyze and manage JSON i18n locale files. Flatten keys with dot notation, get section summaries, and find missing translation keys by comparing two locales.
Features
đ Key Flattening
- Dot notation: common.ok
- Bracket notation: common[ok]
- Unlimited nesting depth
- Section summary counts
đ Missing Keys Finder
- Compare two locale files
- Keys in primary but missing in compare
- Keys in compare but missing in primary
- Instant diff report
đ Statistics
- Total key count
- Section breakdown
- Max nesting depth
- Empty value detection
i18n Management Guide
JSON i18n Format
Most i18n frameworks (react-i18next, vue-i18n, i18next) use nested JSON files. This tool flattens them to dot-notation for easy auditing.
// en.json
{
"common": { "ok": "OK", "cancel": "Cancel" },
"nav": { "home": "Home" }
}
// Flattened:
common.ok = "OK"
common.cancel = "Cancel"
nav.home = "Home"
Keeping translation files healthy
Translation files drift over time: developers add keys to the default language, translators work on another copy and some keys are never removed. Regular checks keep every language complete and stop untranslated text reaching users.
Tips and common pitfalls
- Treat one locale, usually English, as the source of truth and compare every other locale against it.
- Group keys by feature or page (
checkout.button.pay) rather than by component, so they survive refactors. - Use placeholders such as
{name}instead of joining sentences in code; word order differs between languages. - Handle plurals with your library's plural rules. Many languages have more than two plural forms.
More questions
Nested or flat keys?
Both work. Nested files are easier to read and edit, while flat dotted keys are easier to search and diff. Many libraries, including i18next, accept either.
How can I catch missing keys automatically?
Add a CI step that compares the key sets of all locale files and fails the build when a key is missing, or use your library's missing-key logging during testing.