Skip to content

Latest commit

 

History

History
41 lines (28 loc) · 1.08 KB

File metadata and controls

41 lines (28 loc) · 1.08 KB
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.

setLocale()

Description

@short: Applies a new locale to RichText

Usage

setLocale(locale?: Record<string, any> | null): 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