API reference: @salmonui/core/locale
LocaleProvidercomponent
import { LocaleProvider } from '@salmonui/core/locale';function LocaleProvider({ locale, localeText, children }: LocaleProviderProps): ReactNode;
Sets the locale and the localeText defaults of every Salmon UI
component below it. Renders no element. Without a provider components use
their built-in English text and their own locale props, and pay nothing
for this module.
Props: LocaleProviderProps
| Name | Signature | Description |
|---|---|---|
localeoptional | readonly locale?: string | undefined; | BCP 47 locale for dates, numbers and plural rules of every component below. Default: the outer provider's. |
localeTextoptional | readonly localeText?: LocaleCatalog | undefined; | Per-family |
childrenoptional | readonly children?: ReactNode; |