Grid translation context
useGridTranslation, useGridLocale, GridTranslateFunction: generated from the source of active-grid.
Exported by @workspace/. Generated from the package source; part of the index of every export.
Functions, hooks and constants#
- Type
() => GridTranslate Function
The effective translator of the enclosing grid, including an instance override: for a custom cell or editor that renders grid-owned words.
- Type
() => GridPresentation
The effective presentation of the enclosing grid, including an instance override: a locale code or a presentation context. Pass it straight to the central active-format formatters; never read fields off it here.
There is no default (active-format D14): outside a grid this throws.
Types#
Translation function type — compatible with active-i18n's TranslateFunction. The package does NOT read active-i18n's React context (no provider dependency); the consumer passes t explicitly.
type GridTranslateFunction = (
key: string,
variables?: Record<string, string | number | undefined>,
) => string;