|
File Extensions |
.json |
|
API Extension |
i18next / i18next_4 |
|
Import |
Yes |
|
Export |
Yes |
|
Plural forms support |
Yes |
|
Description support |
No |
|
Format options These options that can be specified when a file is uploaded and/or downloaded. Depending on the upload/download method (API, CLI, Repo sync etc.), they can be specified in query parameters |
nesting |
I18next and I18nextV4 are JavaScript libraries that provide easy-to-use localization and internationalization solutions for various environments based on JavaScript. As one of the oldest l10n/i18n libraries, it supports standard i18n library features such as interpolation and plurals and works well with async requests. With proper configuration, it detects browser language settings to automatically load locale-specific data.
Like other JavaScript l10n/i18n libraries, i18next and i18nextV4 use JSON format to store translations. Strings pending translation are either placed at the value directly or nested inside of another object (e.g. interpolated values). For translation, ensure that all variables are kept intact.
If using i18nextV4, select the format when uploading.
AI chatbots can be very effective at generating a list of keys from a .JSON file.
Pluralization is handled differently between the two versions. To determine pluralized keys:
-
i18next uses:
-
For languages with complex plural rules such as Russian,
keyname_0,keyname_1,keyname_2andkeyname_5would be used. -
For languages with simple plural rules such as English,
keynameandkeyname_pluralwould be used.
-
-
i18nextV4 uses
_<plural_suffix>endings; pluralization with words one, two, three or for simple casekeyname_oneandkeyname_other.
Supported:
-
Pluralizations
-
Keys ending in _0, _1, _other etc. will be mapped to the according plural forms.
-
-
Namespaces
-
Arrays
Not supported:
-
Interval Pluralizations are persisted as normal key values. There is no support in the UI.
-
i18next nesting / variable replacement is not directly supported but referencing other keys in translation content is and placeholders can be activated. Cross-referencing keys from within values is not supported. There is no support in the UI.
Format Options
|
Identifier |
nesting |
|
Type |
boolean |
|
Upload |
No |
|
Download |
Yes |
|
Default |
true |
|
Description |
When exporting translation files, keys are nested based on dots in the key name. Set to |
Code Sample (i18next_4)
{
"boolean_key": "--- true\n",
"empty_string_translation": "",
"key_with_description": "Check it out! This key has a description! (At least in some formats)",
"key_with_line-break": "This translations contains\na line-break.",
"nested": {
"deeply": {
"key": "Wow, this key is nested even deeper."
},
"key": "This key is nested inside a namespace."
},
"null_translation": "",
"sample_collection": [
"first item",
"second item",
"third item"
],
"simple_key": "Just a simple key with a simple message.",
"unverified_key": "This translation is not yet verified and waits for it. (In some formats we also export this status)",
"pluralized_key_one": "Only one pluralization found.",
"pluralized_key_other": "Wow, you have %s pluralizations!"
}
Code Sample(i18next)
{
"boolean_key": "--- true\n",
"empty_string_translation": "",
"key_with_description": "Check it out! This key has a description! (At least in some formats)",
"key_with_line-break": "This translations contains\na line-break.",
"nested": {
"deeply": {
"key": "Wow, this key is nested even deeper."
},
"key": "This key is nested inside a namespace."
},
"null_translation": "",
"sample_collection": [
"first item",
"second item",
"third item"
],
"simple_key": "Just a simple key with a simple message.",
"unverified_key": "This translation is not yet verified and waits for it. (In some formats we also export this status)",
"pluralized_key": "Only one pluralization found.",
"pluralized_key_plural": "Wow, you have %s pluralizations!",
"pluralized_keyWithCount": "{{count}} pluralization found.",
"pluralized_keyWithCount_plural": "Wow, you have {{count}} pluralizations!"
}