Skip to main content

locale

Description

Optional. Applies the necessary locale to the Toolbar

Usage

locale?: object;

Default config

By default, Toolbar of 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 To Do List component (read Info below)
});

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

Toolbar is a separate component of To Do List. Thus, before applying the necessary locale to the Toolbar, be sure that you have already applied it to the To Do List

tip

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

Related article: Localization