Documentation / @zerotal/i18n / I18nConfigShape
Interface: I18nConfigShape
Defined in: i18n/src/config.ts:4
Properties
defaultLocale
defaultLocale:
string
Defined in: i18n/src/config.ts:6
Locale used when no resolver matches.
fallbackLocale
fallbackLocale:
string
Defined in: i18n/src/config.ts:8
Locale consulted when a key is missing in the active locale.
supportedLocales
supportedLocales:
string[]
Defined in: i18n/src/config.ts:10
Locales the app accepts; resolvers only return one of these.
resolvers
resolvers:
LocaleResolver[]
Defined in: i18n/src/config.ts:12
Request resolvers, tried in order. Default: query -> cookie -> accept-header.
queryKey
queryKey:
string
Defined in: i18n/src/config.ts:14
Query-string key for the query resolver. Default: lang.
cookieKey
cookieKey:
string
Defined in: i18n/src/config.ts:16
Cookie name for the cookie resolver. Default: locale.
loadPath?
optionalloadPath?:string
Defined in: i18n/src/config.ts:18
Directory of <locale>.json catalogs, loaded on boot.
catalogs?
optionalcatalogs?:Catalogs
Defined in: i18n/src/config.ts:20
In-memory catalogs, merged over anything loaded from loadPath.