Parameters
- configuration: {
fallbackLocale: string;
supportedLocales: readonly string[];
tiebreakerLocalesByLanguageCode?:
| Readonly<Record<string, readonly string[]>>
| ReadonlyMap<string, readonly string[]>
| null;
}
- languages: Iterable<string>
Returns string
the selected supported locale, or the resolved fallback
Choose the first supported match from an ordered list of preferred language tags, examining at most 32 entries. Malformed or unmatched entries are skipped; if none match, return the resolved fallback locale.
Use this for preference lists such as
navigator.languages. For weightedAccept-Languagenegotiation, uselokalized/negotiate.