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 the default locale (English)locale- (optional) an object containing the new locale data to apply to the Toolbar
info
The Toolbar in Kanban is a standalone component. To change the locale for the Toolbar only, use the toolbar.setLocale() method. Calling toolbar.setLocale() without any arguments (or with null) will reset the Toolbar to its default locale. For changing the locale of the Kanban board 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 });
// apply the "de" locale to Kanban
board.setLocale(de);
// apply the "de" locale to the Toolbar
toolbar.setLocale(de);
Change log: The api parameter was deprecated in v1.6
Related articles: Localization