You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
5
+
---
6
+
7
+
# locale
8
+
9
+
### Description
10
+
11
+
@short: Optional. An object that includes localization labels of RichText
12
+
13
+
:::info
14
+
The **locale** object needs to include all labels of RichText with the corresponding translations.
15
+
:::
16
+
17
+
### Usage
18
+
19
+
~~~jsx {}
20
+
locale?: object;
21
+
~~~
22
+
23
+
### Default config
24
+
25
+
By default, RichText uses the **English** locale. You can set it to the custom locale as well.
26
+
27
+
:::tip
28
+
To change the current locale dynamically, you can use the [**setLocale()**](methods/set-locale.md) method of RichText
29
+
:::
30
+
31
+
### Example
32
+
33
+
~~~jsx {3}
34
+
// initialize RichText
35
+
consteditor=newrichtext.RichText("#root", {
36
+
locale:richtext.locale.cn// the Chineese locale will be set initially
37
+
// locale: richtext.locale.en // the English locale will be set initially
38
+
// locale: richtext.locale.de // the Germany locale will be set initially
0 commit comments