# formatLocaleText (@salmonui/data-grid/engine/locale)

> The formatLocaleText function of @salmonui/data-grid/engine/locale: 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.

Canonical: https://salmonui.dev/docs/reference/data-grid/engine-locale/formatLocaleText

```ts
import { formatLocaleText } from '@salmonui/data-grid/engine/locale';
```

Entry index: https://salmonui.dev/docs/reference/data-grid/engine-locale (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/data-grid/engine-locale.md).

## Reference

Kind: function

```ts
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.
