setLocale()
Description
Applies a new locale to RichText
Usage
setLocale(null | locale?: object): void;
Parameters
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).
Example
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