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
According to the Intl.NumberFormat documentation, decimal is supposed to be the default for all plain number formatting. However, in my setup, the useGrouping: false option doesn’t seem to take effect - numbers are still being grouped.
Has anyone run into a similar issue or can point out what might be going wrong with the global number formatters setup? Any guidance would be greatly appreciated.
P.S. If I use { "MILES_AWAY": "{distance, number, decimal} miles away" } in the translation file - it works well, but I would rather not to add a default (decimal) style to all number variables.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Community,
I'm trying to use Global Formatters to format default numbers, but for some reason, they don't seem to work as expected. Here's what I have so far:
Usage:
According to the Intl.NumberFormat documentation, decimal is supposed to be the default for all plain number formatting. However, in my setup, the
useGrouping: false
option doesn’t seem to take effect - numbers are still being grouped.Has anyone run into a similar issue or can point out what might be going wrong with the global number formatters setup? Any guidance would be greatly appreciated.
P.S. If I use
{ "MILES_AWAY": "{distance, number, decimal} miles away" }
in the translation file - it works well, but I would rather not to add a default (decimal) style to all number variables.Beta Was this translation helpful? Give feedback.
All reactions