JSON - Single Language

Last modified: May 20, 2021Author: Jakub Pomykała

The most basic and common JSON format for software app localization. It can be used in any kind of web projects, desktop program or game. Simple JSON object contains translation key set by a developer during program implementation process, and localized message for end user.

File format example

{
  "SALE": "Verkauf",
  "ADDRESS": "Adresse"
}

You can also use multi-language-json format to download all translations at once.

SimpleLocalize also recognizes nested JSON keys like shown below.

{
    "SALE": {
      "NESTED": "Verkauf"
    }
}

Above JSON will result with SALE.NESTED translation key.

Upload with CLI

simplelocalize upload --apiKey <PROJECT_KEY> \
  --uploadFormat single-language-json \
  --uploadPath ./translations_{lang}.json

Learn more about SimpleLocalize CLI and translations upload feature.

Download with CLI

simplelocalize download --apiKey <PROJECT_KEY> \
  --downloadFormat single-language-json \
  --downloadPath ./translations_{lang}.json

Learn more about SimpleLocalize CLI and translations download feature.

Import with API

curl
    --request POST \
    --url 'https://api.simplelocalize.io/api/v2/import?uploadFormat=single-language-json' \
    --header 'x-simplelocalize-token: <API_KEY>' \
    --form file=@/path/to/your/file.json

Learn more about importing translations with API

Export with API

curl
    --request GET \
    --url https://api.simplelocalize.io/api/v3/export?downloadFormat=single-language-json \
    --header 'x-simplelocalize-token: <API_KEY>'

Learn more about exporting translations with API