Table of Contents
File extension: json
I18n type: CHROME
This file format is used for localizing Chrome extensions. It's a JSON file, where every key is a new entry and every value is a dictionary with two elements, message
and description
. The message contains the actual translation string to use and the description serves as a comment to the translators.
Sample Data
{
"key1": {
"message": "Administrators are people that manage the organization.",
"description": "Additional context"
},
"key2": {
"message": "Keep me up to date with Transifex news",
"description": "Additional context"
},
"key3": {
"message": "Connect with users on Transifex",
"description": "Additional context"
}
}
Each of the above entries has:
A uniquely defined key.
A message field where the translatable text is included.
A description field where you can add context for your translators.
A Chrome i18n entry is displayed in Transifex Web Editor as follows:
In case placeholders are included in a Chrome i18n source file as follows:
{
"key1": {
"message": "Administrators are people that manage the organization.",
"description": "Additional context"
},
"key2": {
"message": "Keep me up to date with Transifex news",
"description": "Additional context"
},
"key3": {
"message": "Connect with users on Transifex",
"description": "Additional context",
"placeholders": {
"amount": {
"var1": "$1",
"var2": "2"
}
}
}
}
then these entries (var1 & var2) will be handled as untranslatable text and as a result, they won't be exposed in Transifex Web Editor. However, when a translation file is requested, these i18n entries will be included in the generated file preserving the initial structure of your source file.
Escaping behaviour
More information about the escaping behavior of the Chrome i18n parser can be found here.
Download Options
Download file to translate: The file will contain all entries. In case there are untranslated entries, those will be returned empty.
Download for use: The file will contain all entries. In case there are untranslated entries, those will be filled in with the corresponding source string.
Download only reviewed translations: The file will contain all entries. Any untranslated and unreviewed entries will be filled in with the corresponding source string.
Download for translation as XLIFF: The translation file will be generated in the .xliff format and include both translated and untranslated strings. The latter ones will be returned without containing target elements.
Download untranslated strings as XLIFF: The translation file will be generated in the .xliff format and include only the untranslated strings.
In addition to the above Interface options, you can use the API or Client to download the translation files according to your localization needs.
Parser Behaviour
The following table outlines what occurs to untranslated, unreviewed and un-proofread strings when using the API, CLI or UI to manipulate translation files:
* Proofreading needs to be enabled as an option for this logic to take effect. To learn how to enable proofreading click here.
Read more
Continue reading