Normalize a locale code: trimmed, lower-case, _ → - (' EN_us ' → 'en-us'). Returns undefined for anything that is not a non-empty string.
_
-
' EN_us '
'en-us'
undefined
Normalize a locale code: trimmed, lower-case,
_→-(' EN_us '→'en-us'). Returnsundefinedfor anything that is not a non-empty string.