Skip to main content
Chrome Extensions i18n

Information about how Transifex handles the Chrome extensions (.json) format.

Jacob Doulkeridis avatar
Written by Jacob Doulkeridis
Updated over 10 months ago

File Extension(s)

.json

i18n type(s)

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:

Chrome-i18n.png#asset:4529

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 so 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 behavior

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. If 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 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 behavior

The following table outlines the expected return results depending on the download mode.

*The results are compatible with parser version 3.

๐Ÿ“ Note: Proofreading must be enabled for this logic to take effect. To learn how to enable proofreading, click here.


Default placeholders

These are the default placeholders that you could have in your file, and they will be recognized:

match: ['$1', '$1456868', '$asdfg$', 'abc $$ def $ggg$']

Additional information


๐Ÿ’กTip

Looking for more help? Get support from our Transifex Community Forum!

Find answers or post to get help from Transifex Support and our Community.

Did this answer your question?