setLocale()
Description
Updates the Toolbar of Kanban with a new locale
Usage
setLocale(null | locale?: object): void;
Parameters
null
- (optional) resets the Toolbar back to its default locale (English)locale
- (optional) an object containing the new locale data to apply to the Toolbar
info
The Toolbar in Kanban is an independent component. Use the toolbar.setLocale()
method when you want to change the locale for the Toolbar only. Calling toolbar.setLocale()
without any arguments (or with null) will reset it to the default locale. To update the locale for Kanban itself, use the kanban.setLocale()
method.
Example
// create Kanban
const board = new kanban.Kanban("#root", {});
// create Toolbar
const toolbar = new kanban.Toolbar("#toolbar", { api: board.api });
// set the "de" locale for Kanban
board.setLocale(de);
// set the "de" locale for the Toolbar
toolbar.setLocale(de);
Change log: The api parameter was deprecated in v1.6
Related articles: Localization