How to unflatten flat json for i18n translation files
- Step 1Export flat translations from your TMS — Export the translation file from Phrase, Lokalise, or Crowdin as JSON. Most TMS platforms offer a flat key format option where button.submit.label is a single key with a string value.
- Step 2Paste the flat translation JSON — Paste the flat key-value object. All keys using dot notation will be reconstructed into nested objects matching the i18next namespace structure.
- Step 3Verify plural and interpolation keys — Check that plural suffixes (_one, _other) remain as sibling keys on the correct parent object, and that interpolation strings like Hello {{name}} are preserved exactly in the values.
- Step 4Save as the i18n locale file — Download the nested JSON and save it as public/locales/en/common.json for next-i18next, or src/locales/en.json for vue-i18n. The nested structure loads correctly with no code changes.
Frequently asked questions
Why does i18next require nested JSON instead of flat keys?+
i18next organizes translations into namespaces and keys using a hierarchical lookup — t('button.submit.label') first finds the button namespace, then the submit sub-namespace, then the label key. Flat JSON breaks this lookup. While i18next has a flat-key plugin option, nested JSON is the standard format that works with all plugins and frameworks.
Can I unflatten multiple locale files at once?+
Process each locale separately — paste the English flat JSON, download the nested output, then repeat for French, German, etc. The nesting structure is the same for all locales since it is determined by the key names, not the values.
Is the translation content — including unreleased copy — transmitted to JAD Apps?+
No. The JSON unflattening runs entirely in your browser. Translation strings, locale-specific content, and unreleased copy are never transmitted to JAD Apps servers.
Privacy first
Conversion runs locally in your browser. No file is uploaded — only metadata counters are saved for signed-in dashboard stats.