| 00:41 | <ramsey> | ICU has functions that output BCP-47 identifiers, which are compatible with 402 uloc_canonicalize() which, given a value like EN-US, will output the canonical value en_US, but if you pass en_US to Intl.getCanonicalLocales() (in every implementation I've tried), you get a RangeError. https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/uloc_8h.html#a69b148194cf57ac40d4bb15c5b905260 |
| 18:18 | <ramsey> | Ha ha! Found it. It's uloc_toLanguageTag() |