canonicalizes locale identifiers to /^[a-z]{2,3}_[A-Z]{2}$/; input may use
dashes instead of underscores, wrong case is fixed, and a bare language is
expanded to its most likely region via Intl's CLDR likely-subtag data
(e.g. en => en_US, de => de_DE, ar => ar_EG). Returns null if not a locale.
canonicalizes locale identifiers to /^[a-z]{2,3}_[A-Z]{2}$/; input may use dashes instead of underscores, wrong case is fixed, and a bare language is expanded to its most likely region via Intl's CLDR likely-subtag data (e.g. en => en_US, de => de_DE, ar => ar_EG). Returns null if not a locale.