Referencei18n
getLocaleKey
Normalize a locale tag to the key the i18n registry stores it under
Import
getLocaleKey lowercases a BCP 47 tag, replaces underscores with hyphens, and removes Unicode extensions such as -u-nu-latn. The registry stores registerI18n layers under this key, so use it to compare a tag with one you have registered or to key your own per-locale data the same way.