i18next JSON format
The i18next JSON format reads i18next / react-i18next resource bundles,
the conventions of the dominant web i18n library. It is built on the JSON
format and selected explicitly (-f i18next), because i18next files use the
generic .json extension owned by the JSON format and cannot be reliably
auto-distinguished.
Beyond plain JSON extraction, it protects {{interpolation}},
{{var, format}}, and $t() nesting as inline codes; annotates v4 CLDR
plural sibling keys (key_zero/key_one/…/key_other, plus legacy
key_plural and key_0/key_1) with their base key and plural category;
annotates context keys (key_male/key_female); and names blocks by their
full namespace key path. Round-trip is byte-faithful.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
legacyPluralForms | boolean | true | Gjenkjenn de gamle v1–v3 flertalls-søskennøklene (key_plural og de numeriske formene key_0 / key_1 / key_2 …) i tillegg til v4 CLDR-suffiksene (_zero / _one / _two / _few / _many / _other). |
protectInterpolation | boolean | true | Oppdager i18next-interpolasjon ({{var}}, {{var, format}}) og nesting ($t(key)) og beskytter dem som innebygde koder slik at de aldri oversettes. |
subfilterHtmlValues | boolean | false | Send verdier hvis nøkkel slutter på "_html" (i18next-konvensjonen for markup) til HTML-underfilteret slik at tagger beskyttes og tekst forblir oversettbar. Av som standard: HTML-underfilteret er ikke byte-trofast for rene markup-fragmenter. |
Configure it live
Examples
Protect HTML in _html values
Enable the HTML subfilter for keys ending in _html.
subfilterHTMLValues: true
Processing notes
Plural sibling keys stay 1:1 blocks (preserving byte-faithful round-trip) but are annotated with base key + CLDR category.
{{interpolation}}and$t()nesting are protected as inline codes.Block names use the full namespace key path for nested objects.
← Back to the Format Reference