Custom Localization Language Configuration
Used to configure localization language information, implemented based on vue-i18n
. You can use getI18n
to obtain i18n
information. Browse the Method list and Event list for more localization-related information.
If you find issues with the translation files, please refer to Join the Community to provide your valuable feedback and suggestions. If you need to add a custom language, feel free to submit an Issue or PR.
Default Configuration
{
locale: 'zh-CN',
translations: {
en_US: {},
zh_CN: {},
ru_RU: {},
},
}
Configuration Options
locale
Description: The default language. When multiple Umo Editor instances are used on the same page, the configuration of the last instance takes precedence. If the user has selected another language, the userβs choice takes precedence, ignoring the default language configuration.
Type: String
Default Value: zh-CN
.
Options: zh-CN
, en-US
, ru-RU
translations
Description: Custom translation information.
Type: Object
Default Value: { en_US: {}, zh_CN: {}, ru_RU: {} }
.
Options: See https://github.com/umodoc/editor/blob/main/src/locales. The translations
you configure will be merged with these default translation files, meaning you can override the default translations by configuring translations
.