| sidebar_label | locale |
|---|---|
| title | locale Config |
| description | You can learn about the locale config in the documentation of the DHTMLX JavaScript RichText library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX RichText. |
@short: Optional. An object that includes localization labels of RichText
:::info The locale object needs to include all labels of RichText with the corresponding translations. :::
locale?: object;By default, RichText uses the English locale. You can set it to the custom locale as well.
:::tip To change the current locale dynamically, you can use the setLocale() method of RichText :::
// initialize RichText
const editor = new richtext.RichText("#root", {
locale: richtext.locales.cn // the Chineese locale will be set initially
// locale: richtext.locales.en // the English locale will be set initially
// locale: richtext.locales.de // the Germany locale will be set initially
// other configuration properties
});Change log: The property was added in v2.0
Related articles: Localization
Related sample: RichText. Localization