Localization Configuration
Used to configure the default locale and custom translation content in Umo Editor Mobile. The currently built-in locales are zh-CN and en-US.
Default Configuration
{
locale: 'zh-CN',
translations: {
en_US: {},
zh_CN: {},
},
}Configuration Items
locale
Description: default locale.
Type: String
Default: zh-CN
Optional values: zh-CN, en-US
Additional notes:
- The runtime will prioritize the locale setting stored in local cache.
- If
autois passed, it is internally normalized to eitherzh-CNoren-USbased on the browser language.
translations
Description: custom translation override object.
Type: Object
Default: { en_US: {}, zh_CN: {} }
Optional values:
translations.zh_CNtranslations.en_US
The provided translation content is merged with the built-in language pack and can be used to override default copy.
Recommendations
- If your business only needs Chinese and English, prefer overriding default copy through
translations. - If your business page contains multiple editor instances, it is recommended to control the default locale centrally at the business layer to avoid inconsistent experience caused by local cache.