Number Formatting by Locale: Commas vs Periods
How different countries format numbers: 1,000.00 vs 1.000,00 vs 1 000,00. The Intl.NumberFormat API and locale-aware formatting for global apps.
Published:
Tags: text, developer-tools, i18n
Number Formatting by Locale: Commas, Periods, and Spaces The number looks the same on every computer screen, but when formatted for display it looks radically different depending on the locale. An American sees . A German sees . An Indian sees . A Swiss sees . Using the wrong format in the wrong locale is not just aesthetically wrong — it causes misreading of values by orders of magnitude. --- The Three Separator Systems The Decimal Separator The decimal separator marks where the whole number ends and the fractional part begins: Period (): USA, UK, Australia, Canada, China, Japan Comma (): Most of Continental Europe, Latin America, Russia The Thousands Separator (Grouping) The thousands separator makes large numbers scannable. It groups digits in sets of three (or two in some locales):…
All articles · theproductguy.in