-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Intl.NumberFormat() - narrowSymbol issue in en-CA culture, USD currency #858
Comments
I can reproduce the stated behavior. It appears the change from "$" to "US$" in en-CA appeared in CLDR 42: https://www.unicode.org/cldr/charts/42/delta/en.html#Northern%20America:%20United%20States CC @ptomato @dminor who speak en-CA I filed an upstream issue in CLDR. If it is a bug, it should be fixed in CLDR, not ECMA-402. |
As an en-CA speaker I don't have a particular opinion on this — $100 by itself when referring to USD 100 is misleading and I wouldn't use it, but if it was clear from context, I think it'd be OK. Maybe a good place to check would be the style guide of a Canadian newspaper, such as the Globe and Mail. |
Yeah Canadian refers to CAD as just |
To be sure, this report is about the "narrowSymbol" option which is specifically documented as being useful only when there is enough context, such as prices down a column with a heading "USD". |
Exactly, we have currency specified in the header of the page. In the table we use only symbols, but for better visibility we are using group separators for the thousands and also decimal separator as per the culture of user. |
Upstream fix to land in CLDR 45: unicode-org/cldr#3566 |
Hello,
as per "narrowSymbol"
Use a narrow format symbol ("$100" rather than "US$100").
Issue: When we use en-CA culture, USD currency the result is not narrow symbol $100, but US$100 (which I would expect if I used "symbol".
Test code:
const number = 100;
console.log('USD, en-CA: ',
new Intl.NumberFormat('en-CA', {currencySign: "standard", currencyDisplay: 'narrowSymbol', style: 'currency', currency: 'USD' }).format(
number,
),
);
console.log('USD, en-US: ',
new Intl.NumberFormat('en-US', {currencySign: "standard", currencyDisplay: 'narrowSymbol', style: 'currency', currency: 'USD' }).format(
number,
),
);
Code output:
"USD, en-CA: " "US$100.00"
"USD, en-US: " "$100.00"
PS. it would be good to check also rest of the currencies.
The text was updated successfully, but these errors were encountered: