Skip to main content

locale

Description

Optional. Applies the necessary locale to the component

Usage

locale?: object;

Default config

By default, DHTMLX To Do List uses English locale.

locale: en

Example

const { ToDo, Toolbar} = todo;
const { tasks, users, projects, tags } = getData();

const list = new ToDo("#root", {
tasks,
users,
projects,
locale: de // sets the "de" locale in the component
});

const toolbar = new Toolbar("#toolbar", {
api: list.api,
locale: de // sets the "de" locale in the Toolbar (read Info below)
});
info

The Toolbar is a separate component of To Do List . Thus, you also need to apply the necessary locale to the Toolbar via the related locale property

tip

To change the locale dynamically, use the setLocale() method

Related article: Localization

Related sample: To do list. Localization