JSON
JSON translation files, kept diffable
JSON is the language file of the web: i18next, react-intl, Vue i18n and nearly every JavaScript framework read it. locamorph imports flat or nested JSON, keeps plurals intact as ICU messages, and exports with your project’s indentation, key order and nesting so pull request diffs stay readable.
What locamorph exports parses back identically. The same keys always serialize to the same bytes, so nothing rewrites your file but the translations.
{
"menu": {
"home": "Home",
"projects": "Projects"
},
"checkout": {
"title": "Order summary",
"items": "{count, plural, one {# item} other {# items}}"
}
} In locamorph
How locamorph handles JSON
Flat or nested, your call
menu.home as a dotted key or as an object tree: both import
correctly, and the export setting decides which shape comes back out.
Plurals as ICU messages
JSON has no plural syntax, so locamorph carries all CLDR forms inside one ICU message. Nothing gets flattened to a single form on import.
Deterministic output
Indentation, key order and nesting follow project settings, not the last exporter. Diffs show changed strings, never a reshuffled file.
One honest limitation: JSON itself has no comments, so translator notes do not live in the file. Notes attached in the locamorph editor stay with the key and travel to formats that can hold them, like XLIFF or Android XML.
Ecosystem
Where JSON translations live
React with i18next or react-intl, Vue, Angular,
Svelte, Next.js, Remix, React Native, Electron and Node services all consume JSON
language files; i18next alone counts millions of weekly npm downloads. If your
strings sit in locale/en.json, this is your format.
Typical flow: the repo holds locale/*.json, the
GitHub or
GitLab integration imports new keys on push,
and finished translations come back as a pull request touching only the strings
that changed.
Related
Keep going
Drop in your en.json
Import a JSON file on the free plan and see your keys, plurals and nesting arrive intact. Exports match your formatting settings from the first byte.