Skip to main content

Type Alias: I18nProviderProps

I18nProviderProps = object

Defined in: i18Provider.tsx:10

Properties​

children?​

optional children?: React.ReactNode

Defined in: i18Provider.tsx:25


defaultLocale?​

optional defaultLocale?: string

Defined in: i18Provider.tsx:23

The locale the defaultMessages are written in. Defaults to en, the source locale of every @ttoss/* package; an app authoring in another language sets it, or every untranslated message reports MISSING_TRANSLATION and its fallback text is formatted with English rules.


loadLocaleData?​

optional loadLocaleData?: LoadLocaleData

Defined in: i18Provider.tsx:24


locale?​

optional locale?: string

Defined in: i18Provider.tsx:15

The locale to render. Changing it after mount loads that locale, exactly as setLocale does.


onError?​

optional onError?: (err) => void

Defined in: i18Provider.tsx:30

Receives formatting errors from react-intl and errors thrown by loadLocaleData.

Parameters​

ParameterType
errError

Returns​

void