JSON is a natively supported file format, you can use it without an additional installation. Just upload it to your projects and start the localization.
Attribute | Value |
---|---|
File Extension | .json |
API Type | json |
Source can be edited in Crowdin | Yes |
Generating translated files via Bundles | Search Crowdin Store |
Supports pluralization | No |
WYSIWYG Preview in the editor | No |
Supported types of contextual information | Text comments, Screenshots, In-Context |
Custom attributes | No |
Existing translations import possibility | Key-value mapping |
{
"key": "123-456-222",
"translator": {
"lastname": "Williams",
"firstname": "Ian"
},
"proofreader": {
"lastname": "Ross",
"firstname": "Mike"
},
"project": "The localization content for Umbrella",
"apptype": [
"Website",
"Technology"
]
}
Adding Source Strings to JSON Files
JSON is one of the formats that allow editing (adding, deleting, and modifying) of the source strings directly in Crowdin. Due to that fact, you can add new strings to your JSON files without updating the source file via Content > Files.
Adding Source Strings to the End of the File
Open your project and go to Content > Strings.
Click Add string.
In the appeared dialog, fill in the String and Identifier fields.
In the Files list, select the source file you'd like to add a string to.
(Optional) Add a string context, labels, and set the max.length of the translated text.
Click Save.
As a result, your new string will be added at the end of your JSON source file.
Adding Source Strings to the Nested Object
To add a new string to a nested object(new or existing one), follow these steps:
Open your project and go to Content > Strings.
Click Add string.
In the appeared dialog, fill in the String and Identifier fields.
To let the system know that you'd like your string to be added to the nested object, specify the string identifier in the following format: key1.nestedkey1
In the Files list, select the source file you'd like to add a string to.
(Optional) Add a string context, labels, and set the max.length of the translated text.
Click Save.
As a result, your new string will be added at the end of the nested object with the following structure:
{
"key1":{
"nestedkey1":"Nested string"
}
}
Adding Source Strings with Identifiers Containing Dots
When adding a string to a JSON file (via Crowdin UI or Crowdin API), using a string identifier with dots (e.g., my.test.string.key
) creates a nested JSON object.
If you need to use a string identifier with dots without creating a nested object, wrap the identifier in double quotes (e.g., "my.test.string.key"
).
Crowdin is a platform that helps you manage and translate content into different languages. Integrate Crowdin with your repo, CMS, or other systems. Source content is always up to date for your translators, and translated content is returned automatically.
Learn MoreReleased on May 16, 2022
Updated on Oct 16, 2024
Published by Crowdin
Identifier:json