File Extensions |
.json |
API Extension |
strings_json |
Import |
Yes |
Export |
Yes |
Plural forms support |
Yes |
Description support |
Yes |
State support |
Yes |
Metadata support |
Yes |
Format options |
ignore_translation_state export_translation_state export_description export_tags export_system_tags export_max_characters_allowed custom_metadata_columns |
Phrase Strings JSON format provides a structured way to store and manage translations, incorporating metadata, state tracking, and workflow integration for improved functionality.
This format includes metadata such as localization details, character limits, descriptions, and translation states. The state support feature allows better tracking of translation progress and integration with automated workflows.
Key Object
The key object contains metadata and settings for each translation key.
Field |
Required |
Type |
Description |
---|---|---|---|
|
Yes |
String |
Unique identifier for the key. |
|
No |
String |
A brief explanation of the key’s purpose. |
|
No |
Boolean |
Specifies if the key supports pluralization. |
|
No |
Integer/Null |
Maximum number of characters allowed. |
|
No |
Array |
Categorization tags for filtering and organization. |
|
No |
Object |
Stores additional metadata as key-value pairs. It can be added or updated but not removed. To remove metadata, set its value to an empty string. |
Translations Object
The translations object contains localized translations for a given key.
Field |
Required |
Type |
Description |
---|---|---|---|
|
Yes |
String |
The name or identifier of the locale. |
|
No |
String |
The locale’s language code (e.g., en-US, fr-FR). |
|
Yes |
String/Object |
The translated content. If pluralized, an object mapping plural forms. |
|
No |
String |
The state of the translation. Supported translation states:
|
Format Options
Identifier |
ignore_translation_state |
Type |
boolean |
Upload |
Yes |
Download |
No |
Default |
false |
Description |
If true, ignores state values in imported translations, meaning that the uploaded file will not overwrite existing translation states. |
Identifier |
export_translation_state |
Type |
boolean |
Upload |
No |
Download |
Yes |
Default |
true |
Description |
Includes state values in exported translations; if set to false, state information will be omitted from the exported file. |
Identifier |
export_system_tags |
Type |
boolean |
Upload |
No |
Download |
Yes |
Default |
false |
Description |
If true, exports system tags along with keys and translations. |
Identifier |
export_tags |
Type |
boolean |
Upload |
No |
Download |
Yes |
Default |
false |
Description |
If true, exports tags along with keys and translations. |
Identifier |
export_description |
Type |
boolean |
Upload |
No |
Download |
Yes |
Default |
true |
Description |
Exports key description. |
Identifier |
export_max_characters_allowed |
Type |
boolean |
Upload |
No |
Download |
Yes |
Default |
true |
Description |
Exports the key character limit along with keys and translations. |
Identifier |
custom_metadata_columns |
Type |
hash |
Upload |
No |
Download |
Yes |
Default |
[empty] |
Description |
HashMap of custom metadata values that need to be imported or exported:
|
Code Sample
{ "welcome_message": { "key": { "description": "Message displayed on the welcome screen", "plural": false, "max_characters_allowed": 100, "tags": ["UI", "greeting"], "metadata": { "created_by": "admin", "created_at": "2024-06-20T12:34:56Z" } }, "translations": [ { "locale": "English (United States)", "locale_code": "en-US", "content": "Welcome to our application!", "state": "reviewed" }, { "locale": "French (France)", "locale_code": "fr-FR", "content": "Bienvenue dans notre application !", "state": "translated" } ] } }