Skip to main content

setLocale()

Description

Sets a new locale for the Kanban component

Usage

setLocale(null | locale?: object): void;

Parameters

  • null - (optional) resets the locale back to the default (English)
  • locale - (optional) an object defining the new locale data to apply
info

The setLocale() method is designed to update the locale specifically for Kanban. To revert Kanban to its default locale, just call setLocale() without any arguments (or pass null). If you need to change the locale for the Toolbar alone, use the toolbar.setLocale() method.

Example

// create Kanban
const board = new kanban.Kanban("#root", {
columns,
cards,
});
// set the "de" locale for Kanban
board.setLocale(de);
// reset Kanban to the default locale
board.setLocale(); // or board.setLocale(null);

Change log: This method was updated in version 1.2

Related articles: Localization