Lokalise supports structured JSON files.
Structured JSON file entries can contain the following properties:
-
translation
– The actual translation (required) -
notes
– Description of the key (optional) -
context
– Context of the key (optional) -
limit
– Character limit for the key (optional)
Example:
{
"mm_homepage": {
"translation": "Homepage",
"notes": "Title for main menu"
},
"mm_about": {
"translation": "About us",
"notes": "Title for main menu",
"limit": 20
},
"somekey": {
"translation": "First level key"
},
"somekey::sub": {
"translation": "Second level key"
}
}
Keep in mind that structured JSON does not support key nesting (multi-level keys, such as nested JSON), so all of the keys must be provided in one level. This also applies to export - all of the selected keys to be exported in structured JSON format will be exported in one level.