Skip to content

Latest commit

 

History

History
47 lines (33 loc) · 1.42 KB

File metadata and controls

47 lines (33 loc) · 1.42 KB
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.

locale

Description {#description}

@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. :::

Usage {#usage}

locale?: object;

Default config {#default-config}

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 :::

Example {#example}

// 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