View as Markdown

API reference: @salmonui/data-grid/engine/locale

formatLocaleTextfunction

import { formatLocaleText } from '@salmonui/data-grid/engine/locale';
function formatLocaleText(text: Readonly<Record<string, LocaleMessage>>, key: string, params?: LocaleTextParams, locale?: string): string;

Formats a message: picks the plural form for params.count (or the first numeric parameter) and fills {param} placeholders; numeric parameters use the locale's number format. Unknown keys return the key; missing parameters stay as written. Never throws.