Add ability to use the European number format without specifying a country
Yes, I know, probably not the right place for this. Still.
toLocaleString
has a list of dozens and dozens of country settings. But no "eu". Hmmm.
Sometimes it's convenient to just tell js "Use the European number format" without having to specify a country.
I suggest "eu" be added as a setting for 'toLocaleString'
Thanks for filing the issue. I've tagged this as "User Preferences" to track this as part of ongoing efforts to improve localization quality on the Web.
By the way, locale "eu" is Basque.
Would en-150 not be the correct tag for this in BCP47? (I doubt it's currently supported by browsers in the way you'd expect though.)
It looks like the CLDR semantics of en-150 are explicitly not to change the decimal separator: https://github.com/unicode-org/cldr/blob/main/common/main/en_150.xml
In general, it seems that CLDR is rather buggy in this area: The results for attaching a continental European region code to en are incoherent for currency vs. non-currency formatting, which seems bad regardless of what one thinks the right behavior is for attaching a continental European region code to en.
Furthermore, I think the premise of this request is faulty: There isn't a country-independent European number format. Right now in CLDR FR and DE have a different thousand separator.
In general, it seems that CLDR is rather buggy in this area: The results for attaching a continental European region code to
enare incoherent for currency vs. non-currency formatting, which seems bad regardless of what one thinks the right behavior is for attaching a continental European region code toen.
There are also issues when formatting currencies in locales inheriting from en-150:
- https://bugzilla.mozilla.org/show_bug.cgi?id=1849971
- https://unicode-org.atlassian.net/browse/CLDR-17074
- https://unicode-org.atlassian.net/browse/CLDR-17965
(I was kind of hoping that en-150 would signify Euro-English, but not that seriously 😄)