Navigation

canonicalization

Currently there are several kinds of 'canonically equivalent' locales. The cases are:1. he/iw (and two other legacy mappings from current to old language codes)2. en/eng (mapping from three-letter to two-letter codes)3. ja_JP_JP/ja-jp-u-ca-japanese (and two other locales that have behavior equivalent to a BCP47-style locale but not themselves legal BCP47)

At what point should this mapping be done? Some options that come to mind are:a) neverb) by locale constructor, but only therec) on calls to new BCP47 APIs, but not constructord) everywheree) only upon user requestf) ...

The 'best' option might differ depending on the case. But then we also need to explain the different cases in detail so that users understand why behavior is different among them.