Skip to main content

setLocale()

Description

Changes the locale settings for Kanban

Usage

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

Parameters

  • null - (optional) resets Kanban to the default locale (English)
  • locale - (optional) an object containing the new locale data to be applied
info

The setLocale() method is used to update the locale for Kanban only. To revert Kanban back to the default locale, call setLocale() without any arguments or pass null. For changing the locale of the Toolbar, use the toolbar.setLocale() method instead.

Example

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

Change log: The method was updated in v1.2

Related articles: Localization