matchLocale
matchLocale(
tag,available):string|null
Defined in: i18n/Localization.ts:145
Pick the best available locale for a platform tag: exact match first, else the first locale sharing the primary language (‘zh-Hans-CN’ → ‘zh-CN’), else null — the caller keeps its current locale. Pure.
Parameters
Section titled “Parameters”string
available
Section titled “available”readonly string[]
Returns
Section titled “Returns”string | null