JavaScript Data GridLocale

Configure Handsontable's locale settings, to properly handle locale-related data and actions such as filtering, searching, or sorting.

Overview

Handsontable's locale settings affect certain actions performed on your data, such as:

Without a properly-set locale, the above operations can work incorrectly.

You can configure your locale settings, using the locale configuration option.

You can set the locale option to any valid and canonicalized Unicode BCP 47 locale tag. By default, Handsontable's locale is en-US.

You can configure the locale setting:

Set the grid's locale

To configure the locale of the entire grid, set the locale configuration option as a top-level grid option:

const hot = new Handsontable(container, {
  // set the entire grid's locale to Polish
  locale: 'pl-PL',
});

You can set the locale option to any valid and canonicalized Unicode BCP 47 locale tag.

Set a column's locale

To configure the locale of an individual column, set the locale configuration option as a mid-level column option:

const hot = new Handsontable(container, {
  columns: [
    {
      // set the first column's locale to Polish
      locale: 'pl-PL',
    },
    {
      // set the second column's locale to German
      locale: 'de-DE',
    },
    {
      // set the third column's locale to Japanese
      locale: 'ja-JP',
    },
  ],
});