| sidebar_label | setLocale() |
|---|---|
| title | setLocale Method |
| description | You can learn about the setLocale method 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: Applies a new locale to RichText
setLocale(locale?: Record<string, any> | null): void;null- (optional) resets to the default locale (English)locale- (optional) the object of data of the new locale to be applied
:::info
Use the setLocale() method to apply a new locale to RichText. To reset RichText to the default locale, call the setLocale() method without arguments (or with a null value).
:::
const editor = new richtext.Richtext("#root", {
// configuration properties
});
// apply the "de" locale to RichText
editor.setLocale(de);Change log: The method was added in v2.0
Related articles: Localization