You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some locales (in fact, currently just one, namely fr_CH) define a currencyDecimal field. This value should be used as the decimal separator, but only for currency values.
The expected output is 12 345.68 $US. Compare with JS Intl.NumberFormat (tested in Firefox and Chrome), which correctly has a . for the decimal separator instead of the ,:
The fix would probably involve passing a decimal_separator keyword argument to NumberPattern.apply, and using this from all branches of format_currency. It looks like the data needed is already available on Locale:
+1. I would consider that as a bug. The decimal symbol is correct for other locales but wrong for fr_CH. When using de_CH it returns the correct decimal symbol for Switzerland, which is "."
Some locales (in fact, currently just one, namely
fr_CH
) define acurrencyDecimal
field. This value should be used as the decimal separator, but only for currency values.babel doesn't use it though:
The expected output is
12 345.68 $US
. Compare with JSIntl.NumberFormat
(tested in Firefox and Chrome), which correctly has a.
for the decimal separator instead of the,
:The fix would probably involve passing a
decimal_separator
keyword argument toNumberPattern.apply
, and using this from all branches offormat_currency
. It looks like the data needed is already available on Locale:This is the only Locale that has that
currencyDecimal
key innumber_symbols
.The text was updated successfully, but these errors were encountered: