Numbers should be formatted according to international standards to make it easy for users around the world to read, understand and compare them.
This guideline presents a recommendation on how to make sure the right number format is automatically displayed to the user based on their cultural context and provides further information around the concepts of visual separation and the international usage of different symbols for the purpose.
Automatic localisation
The symbols used to visually separate numbers vary from country to country (and sometimes even within countries). Although rules of thumb are sometimes applied for determining which groups of countries follow the same patterns (e.g. English-speaking countries) no simple rules exist.
To account for this, and make sure each individual user is met with the number format they are familiar with, we recommend using Intl.NumberFormat (a standard built-in JavaScript object) to automatically display the appropriate separator symbols based on the user’s locale - a combination of language and country chosen by the user in their operating system.
Example of a locale: pt-BR = Portuguese (Brazil)
On maersk.com the user can also choose to manually override their OS locale by choosing among the 12 supported languages in the main navigation.
Please note
To prevent Intl.NumberFormat from rounding currencies the maersk.com platform has created a wrapper function.
Fallback option
In case automation is not an option we recommend falling back to the rules for British (UK) English, which is the official corporate language of all Maersk companies.
Concepts and international standards
Types of visual separation
Numbers can be visually separated in two ways:
1. Decimal separation
A decimal separator is used to distinguish the integer part from the fractional part of a number.
Example: 1.5 (one and a half)
2. Digit grouping
Thousands separators (and other ways of grouping digits) are used to facilitate reading and comparing of large numbers by splitting them up into chunks.
Example: 1,500,000 (one and a half million)
The Indian numbering system deviates from the international norm of thousands separators. Instead the rightmost three digits are grouped and from there every two digits are grouped.
Example: 15,00,000 (15 lakh = one and a half million)
Symbols and international standards
Countries using a period (full stop) as the decimal separator
In the following countries a period (or full stop) [ . ] is used as the decimal separator whereas a comma [ , ] is used as the thousands separator.
Example: 1,000.50 (one thousand and a half)
Australia, Bangladesh, Botswana, British West Indies, Cambodia, Canada (when using English), China, Dominican Republic, Egypt, El Salvador, Ethiopia, Ghana, Guatemala, Guyana, Honduras, Hong Kong, India, Ireland, Israel, Jamaica, Japan, Jordan, Kenya, Korea (North & South), Libya, Liechtenstein, Luxembourg (uses both marks officially), Macau (in Chinese and English text), Malaysia, Maldives, Malta, Mexico, Myanmar, Namibia (uses both marks), Nepal, New Zealand, Nicaragua, Nigeria, Pakistan, Panama, Philippines, Puerto Rico, Qatar, Saudi Arabia, Singapore, Somalia, Sri Lanka, Switzerland, Syria, Taiwan, Tanzania, Thailand, Uganda, United Arab Emirates, United Kingdom, United States (including insular areas)
Countries using a comma as the decimal separator
In the following countries a comma [ , ] is used as the decimal separator whereas a period (or full stop) [ . ] is used as the thousands separator*.
Example: 1.000,50 (one thousand and a half)
Albania, Algeria, Andorra, Angola, Argentina, Armenia, Austria, Azerbaijan, Belarus, Belgium, Bolivia, Bosnia and Herzegovina, Brazil, Bulgaria, Cameroon, Canada (when using French), Chile, Colombia, Costa Rica, Croatia, Cuba, Cyprus, Czechia, Denmark, East Timor, Ecuador, Estonia, Faroe Islands, Finland, France, Germany, Georgia, Greece, Greenland, Hungary, Iceland, Indonesia, Italy, Kazakhstan, Kosovo, Kyrgyzstan, Latvia, Lebanon, Lithuania, Luxembourg (uses both marks officially), Macau (in Portuguese text), Mauritania, Moldova, Mongolia, Morocco, Mozambique, Namibia (uses both marks), The Netherlands, North Macedonia, Norway, Paraguay, Peru, Poland, Portugal, Romania, Russia, Serbia, Slovakia, Slovenia, Somalia, South Africa, Spain, Suriname, Sweden, Switzerland, Tunisia, Turkey, Turkmenistan, Ukraine, Uruguay, Uzbekistan, Venezuela, Vietnam, Zimbabwe
Countries using spaces as the thousands separator
It is worth noting that a few countries (France, Sweden) are using spaces (instead of commas or periods) to group digits. Some official organisations (BIPM, IUPAC, AMA) also recommend this practice.
Example: 1 500 000 (one and a half million)