Skip to main content

setLocale()

Description

Applies a new locale to the Toolbar of Kanban

Usage

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

Parameters

  • null - (optional) resets Toolbar to the default locale (English)
  • locale - (optional) the object of new locale data to be applied to the Toolbar
info

The Toolbar of Kanban is a separate component. Use the toolbar.setLocale() method to apply a new locale to Toolbar only. To reset Toolbar to the default locale, call the toolbar.setLocale() method without arguments (or with a null value). Use the kanban.setLocale() method to apply a new locale to Kanban only.

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