JSON

  • File extension: *.json
  • Localization type: “json”
  • Pluralization: no
  • Context: no
  • Translations Upload: yes

File Sample

{
   "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

  1. Open your project and go to Content > Strings.
  2. Click Add string.
  3. In the appeared dialog, fill in the String and Identifier fields.
  4. In the Files list, select the source file you’d like to add a string to.
  5. (Optional) Add a string context, labels, and set the max.length of the translated text.
  6. 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:

  1. Open your project and go to Content > Strings.
  2. Click Add string.
  3. 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"
  4. In the Files list, select the source file you’d like to add a string to.
  5. (Optional) Add a string context, labels, and set the max.length of the translated text.
  6. 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"
   }
}

See Also

Was this article helpful?