API reference / @localizer/core / getLocaleChain
Function: getLocaleChain()
getLocaleChain(
locale):LocaleCode[]
Defined in: fn/locale/get-locale-chain.ts:47
Generates a list of locale codes starting with the given locale, followed by its parent locale (if applicable), and fallback locales.
Caches results for better performance.
Parameters
| Parameter | Type | Description |
|---|---|---|
locale | LocaleCode | The locale code to generate the chain for. |
Returns
An array of locale codes.