Internationalization

April 28, 2026 · View on GitHub

Override any UI string at runtime via the labels option, or bake in a complete locale file at build time.

Default Labels (en-US)

KeyDefault Value
sortDefaultSort
sortAscSort ascending
sortDescSort descending
groupColumnGroup by this column
ungroupColumnUngroup this column
groupCollapseCollapse group
groupExpandExpand group
treeCollapseCollapse
treeExpandExpand
expandDetailExpand row
collapseDetailCollapse row
filterPlaceholderFilter...
filterDisabledFilter disabled
filterColumnFilter this column
paginationPreviousPrevious
paginationNextNext
paginationPagePage
paginationOfof
paginationRowsrows
emptyHeadingNo data
emptyDescriptionNo rows to display
toolbarOfof
toolbarRowsrows
statsVisibleRowsvisible rows
groupRowsSuffixrows

Runtime Override

Pass partial overrides via GridOptions.labels:

const gridOptions: GridOptions = {
  id: 'my-grid',
  data: myData,
  columnDefs: myColumns,
  labels: {
    filterPlaceholder: 'Filtrer...',
    emptyHeading: 'Aucune donnée',
    emptyDescription: 'Aucune ligne à afficher',
    paginationPrevious: 'Précédent',
    paginationNext: 'Suivant',
  },
};

Build-Time Locale

Bake in a complete locale file at build time. This replaces en-US.json during the build:

node scripts/build-grid.mjs --locale projects/ui-grid/src/lib/grid/i18n/fr-FR.json

Creating a Locale File

  1. Copy projects/ui-grid/src/lib/grid/i18n/en-US.json
  2. Translate all 26 keys
  3. Save as a new JSON file (e.g. fr-FR.json)
  4. The file must use the same key names — only the values change

ARIA Labels and Screen Readers

All interactive elements in the grid derive their aria-label values from the GridLabels object. When you provide translated labels, screen reader announcements localize automatically — no additional configuration is needed.

Labels that flow into ARIA attributes:

Label KeyARIA Usage
sortDefault / sortAsc / sortDescaria-label on sort buttons
groupColumn / ungroupColumnaria-label on group toggle buttons
groupCollapse / groupExpandScreen reader text on group disclosure rows
treeCollapse / treeExpandaria-label on tree toggle buttons
expandDetail / collapseDetailaria-label on expand/collapse detail buttons
filterColumnScreen reader text prefix for filter inputs ("Filter {column}")
paginationPrevious / paginationNextaria-label on pagination buttons
paginationPagearia-label on the pagination <nav> element

See the Accessibility guide for the full a11y documentation.