How to translate .json files
JSON (JavaScript Object Notation) is a lightweight data-interchange format. JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript, Perl, Python, and many others.
Both simple and nested JSON files are supported.
The file which you wish to translate should not contain html tags.
TextUnited enables a user to upload JSON files for translation or to store them in a GITHUB or Bitbucket repository which can be connected to TextUnited. In this case TextUnited can look up the files for translation.
-
Make sure you follow JSON's syntax properly. For example, always use double quotes, always quotify your keys, and remove all callback functions.
-
Comments in .json files are not allowed
- TextUnited can extract both top level keys and objects (sub level keys)
- TextUnited can extract arrays of multiple values
Simple JSON file example:
{
"value": "menu",
"size": "200 pixels",
"content": "This is content for translation"
}
Simple JSON file translated with TextUnited:
{
"value": "xxxx",
"size": "200 xxxxxx",
"content": "Xxxx xx xxxxxxx xxx xxxxxxxxxxx"
}
Nested JSON file example:
{"menu": {
"value": "File",
"popup": {
"menuitem": [
{"value": "New"},
{"value": "Open"},
{"value": "Close"}
]
}
}}
Nested JSON file translated with TextUnited:
{"menu": {
"value": "Xxxx",
"popup": {
"menuitem": [
{"value": "Xxx"},
{"value": "Xxxx"},
{"value": "Xxxx"}
]
}
}}
JSON is built on two structures:
-
A collection of name/value pairs. In various languages, this is realized as an object, record, struct, dictionary, hash table, keyed list, or associative array.
-
An ordered list of values. In most languages, this is realized as an array, vector, list, or sequence.
Official json documentation
http://json.org/