Kartela JSON

Ndryshuar në versionin 4.3: The structure of JSON file is properly preserved even for complex situations which were broken in prior releases.

JSON format is used mostly for translating applications implemented in JavaScript.

Weblate currently supports several variants of JSON translations:

JSON translations are usually monolingual, so it is recommended to specify a base file with (what is most often the) English strings.

Ndihmëz

The JSON file and JSON nested structure file can both handle same type of files. Both preserve existing JSON structure when translating.

The only difference between them is when adding new strings using Weblate. The nested structure format parses the newly added key and inserts the new string into the matching structure. For example app.name key is inserted as:

{
   "app": {
      "name": "Weblate"
   }
}

Kartela shembull

Shembull kartele:

{
  "Hello, world!\n": "Ahoj světe!\n",
  "Orangutan has %d banana.\n": "",
  "Try Weblate at https://demo.weblate.org/!\n": "",
  "Thank you for using Weblate.": ""
}

Nested files are supported as well (see above for requirements), such a file can look like:

{
  "weblate": {
    "hello": "Ahoj světe!\n",
    "orangutan": "",
    "try": "",
    "thanks": ""
  }
}
Supported features

File extensions

.json

Linguality

Both monolingual and bilingual

Supports plural

No

Supports descriptions

No

Supports explanation

No

Supports context

No

Supports location

No

Supports flags

No

API identifier

json, json-nested

Supports read-only strings

No

Formësim Weblate-i

Typical Weblate Component configuration

Maskë kartele

langs/translation-*.json

Kartelë njëgjuhëshe gjuhe bazë

langs/translation-en.json

Gjedhe për përkthime të reja

Empty

Format kartelash

JSON nested structure file

Parametra formati kartelash

Parametra formati kartelash with the pattern json_* can be used to configure the behavior of the JSON format.