Interface
The translation json, which is used to save the translation of the config, including the config of widgets, pages, dialogs, etc.
The translation key is the path that can identify the string that needs to be translated, separated by dot. If it's an array, use [] to identify the index.
This is the same path rule of the lodash.set() method.
Here are some examples:
- pages.page_1.label // page label
- widgets.widget_1.config.functionConfig.text // button text
- widgets.widget_1.config.queryItems[0].name // query item name
If the JSON key does not match a config property, it will be ignored.
We need to create one translation file for each language, the file name is the language code, such as en.json , zh.json , etc.
The file content is this JSON object. Instead of saving the translation in the config, we save the language code in the appConfig.languages only.
The translation files are saved the item resources, under the translations folder.
For for published version, they are under the resources/translations folder.
For the draft version, they are under the resources/draft/translations folder.