View as Markdown

API reference

@salmonui/data-grid/engine/locale

23 exported symbols: 8 functions, 6 interfaces, 8 types and 1 constant. Each name links its page with the signature, docs and members. Names re-exported from another entry point are listed there, linked below.

import { … } from '@salmonui/data-grid/engine/locale';

Functions

  • createFormatterA formatter for one locale; compiled formats and Intl objects are cached on the instance.
  • createLocaleTextModuleKeeps the resolved text in the snapshot (snapshot.modules.localeText). Options: localeText (overrides over English). localeText.set replaces the overrides.
  • formatLocaleTextFormats a message: picks the plural form for params.count (or the first numeric parameter) and fills {param} placeholders; numeric parameters use the locale's…
  • formatValueFormats a value like a column format would (template helper). Formatters are shared per (locale, currency, time zone).
  • isRtlLocaleTrue for right-to-left locales (ar, he-IL, fa, ur-PK, az-Arab, ...). Invalid locales are LTR.
  • parseNumberParses localized number text: '1.234,5' in de-DE is 1234.5. Accepts the locale's digits, group, decimal and minus symbols (and ASCII -, and . when it is not th…
  • resolveLocaleResolves the locale props to the engine options (locale, direction, currency, timeZone) and the text.
  • resolveLocaleTextEnglish merged with override bundles, left to right. Invalid entries are ignored.

Interfaces

Constants

  • DEFAULT_LOCALE_TEXTBuilt-in English text for every user-visible core and renderer string. Keys are flat camelCase; parameters are listed per key. Menu and toolbar item labels use…

Re-exported entry points