Master Localized Numbers in 5 Minutes

Localization
Chidinma Egwuogu
21 Sep 2023

10 min. read

Contents

Order a pizza and get a thousand pizzas? Unfortunately that’s not a bonus. That’s a number localization bug.

Localized numbers might seem like a small part of your localization project but getting them wrong can cost you money, trust or even customers.

This post goes into the details of number localization and offers tips to get numbers right for every audience.

Pro tip: Mistakes in number localization can lead to costly errors. Use Centus’ robust quality control checks to detect and correct localization oversights before you ship. Learn more.

What are localized numbers?

Localized numbers are the presentation of numbers in a format that’s familiar to the target audience. This includes things like decimal points, thousand separators, currency symbols, date formats and even phone number structures.

For example, while the US uses a period as a decimal separator (e.g. $1.50), many European countries use a comma (e.g. €1,50).

Why are numbers localization important?

  • Better user experience. People are used to seeing numbers in a specific format based on their cultural and regional background. Presenting numbers in a localized way ensures your content connects with your audience and is easy for them to understand.
  • Trust building. Incorrect number formats can look foreign or even suspicious to users. Localizing numbers helps to build trust and confidence in your brand.
  • Avoiding misunderstandings. A misplaced decimal or wrong date format can cause huge confusion. Accurate and localized numbers prevent misinterpretation which could lead to business losses or customer dissatisfaction.
  • Legal and compliance reasons. Some countries have specific regulations on how numbers, especially financial ones, should be presented. Localizing numbers isn’t just about user experience. It’s also about compliance with international standards.

Numbers localization: decimal and thousand separators

Numbers are universal but presented differently across cultures. One big difference is the decimal point and thousand separator.

Decimal separators are used to separate the number from its fractional part, while thousand separators help break up larger numbers for readability.

Standard numbers. In the US the number 10,000 is written as 10,000, while in many European countries it’s written as 10.000. In French the number 1234.56 is written as 1 234,56 where the space ( ) between 1 and 2 is the thousand separator and the comma (,) is the decimal separator.

The Indian numbering system is also different. Instead of the common “thousands” grouping, they use “lakhs” and “crores”. For example what would be 10,000,000 in many Western countries is written as 1,00,00,000 in India meaning 1 crore.

Scientific notation. This is used for very large or very small numbers and has variations based on regions.

For example in the USA the number 12,300 in scientific notation is written as 1.23 x 10^4. In Germany it’s 1,23 x 10^4 using a comma as the decimal separator.

Here’s the table that shows the differences in decimal and grouping presentation across countries:

Country/region Decimal and grouping presentation
United States 1,234,567.89
United Kingdom 1,234,567.89
Germany 1.234.567,89
France 1 234 567,89
Brazil 1.234.567,89
India 12,34,56,789.89
China 1,234,567.89
Switzerland 10'000.00
Arabic-speaking regions ١٬٢٣٤٬٥٦٧٫٨٩

How to localize:

  • For web developers working with HTML, CSS or JavaScript, use classes or pseudo-classes to mark numbers with the correct separators. The lang attribute is crucial. For example, <html lang="es"> means Spanish formatting.
  • Libraries that manage number localization are a lifesaver. In JavaScript we have Intl.NumberFormat. Python users have their locale module, while Java developers can use NumberFormat class.
  • When handling scientific notation in software always provide options for both commas and periods as decimal separators. This ensures the notation is presented correctly based on the user’s locale.
  • For platforms targeting specific regions, check local educational or scientific publications to ensure the notation matches local standards.
  • Regardless of the method, make sure your platform recognizes the user’s locale and most importantly always test to confirm accuracy especially in contexts like e-commerce or finance.

Date formats localization

Date formats can vary based on language, region or culture of the user. The day, month, year sequence, separators and even calendar systems can be different.

These small differences can seem insignificant but can cause big misunderstandings. For example , 04/07/2022 can be interpreted as April 7th in the U.S. but July 4th in many other countries.

Country/region Date format Presentation
United States MM/DD/YYYY 04/07/2022
United Kingdom DD/MM/YYYY 07/04/2022
Germany DD.MM.YYYY 07.04.2022
Japan YYYY/MM/DD 2022/04/07 or 2022年04月07日
China YYYY-MM-DD 2022-04-07
Canada DD/MM/YYYY or MM/DD/YYYY 07/04/2022 or 04/07/2022

How to localize:

  • Use the HTML5 <input type="date"> element for date input fields to auto-localize based on the user’s settings. Providing a placeholder or format guideline can prevent user confusion.
  • For JavaScript projects consider libraries like Intl.DateTimeFormat for date manipulation and localization.
  • In Java SimpleDateFormat for date formatting and localization, in Python use datetime module.
  • Leaving users to guess dates is not the answer. Always validate and store dates in a consistent format like ISO 8601 and then convert them for display based on the user’s locale for clarity and consistent data handling.

To learn more about number localization in Java, read our comprehensive guide.

Time formats localization

Just as date formats differ, time formats also vary from one region to another. The differences are mainly around the 12-hour vs 24-hour clock but there are other subtleties too like the terms used for AM and PM.

For example the military and many European countries use 24-hour clock and don’t need AM and PM. Some countries use different figures to show this notation.

Country/region Time format Example Notation for AM/PM
United States 12-hour 2:30 PM AM/PM
United Kingdom 24-hour 14:30 -
Germany 24-hour 14:30 -
Japan 12-hour 2:30 午後 午前 (AM), 午後 (PM)
China 12-hour 2:30 下午 上午 (AM), 下午 (PM)
India 12-hour 2:30 PM AM/PM

How to localize:

  • For web applications use HTML5’s <input type="time"> or <input type=“datetime-local”>.
  • For other languages use the libraries and modules specified in the date format section above.
  • Prevent user confusion by allowing users to choose their time format in application settings. Also always validate time inputs to make sure they’re correct.

Currency localization

Different languages have different currency symbols and also different symbol placement conventions (before the amount, after, with a space or without).

Here is a table showing the currency symbol placement variations across different countries:

Country/region Currency Symbol Example
United States US Dollar $ $100
United Kingdom British Pound £ £100
European Union Euro 100€
Japan Yen ¥ ¥10,000
China Yuan ¥ or 元 ¥100 or 100元
India Rupee ₹100

How to localize:

  • The Intl.NumberFormat object in JavaScript provides a way to format numbers according to the language and locale conventions. You can use this syntax:

    Intl.NumberFormat('en-US', {style: 'currency', currency: 'target currency'})
    
    .format(monetary_value);
    
  • Java has the NumberFormat class which provides methods for formatting numbers and parsing currencies. Python has the locale module for similar purposes.

  • Always make sure the user knows which currency they are dealing with especially in e-commerce. Consider giving options for currency conversion or displaying an approximate value in the user’s local currency next to the original amount.

Phone numbers localization

Each country has its own phone number structure, length, rules and country calling codes. These codes vary greatly from +1 for United States and Canada to +91 for India.

Some international phone number variations:

Country/region Country code Sample phone number Notes
United States +1 +1 212-555-1234 10-digit national format.
United Kingdom +44 +44 7123 456789 Mobile numbers begin with 07 but use country code +44.
Germany +49 +49 030 12345678 8 to 11 digits, depending on region and type.
Japan +81 +81 03-1234-5678 City code followed by a local number.
China +86 +86 131 2345 6789 Mobile numbers often start with specific prefixes like 131.
India +91 +91 98765 43210 Mobile numbers are typically 10 digits long.
Nigeria +234 +234 812 345 6789 Mobile numbers typically start with specific network prefixes, like 812.

How to localize:

  • Use libraries like Google’s libphonenumber to format, parse and validate phone numbers.
  • Implement an automatic format suggestion or dropdown list for country codes based on the user’s selected country.

Percentages localization

Percentages are presented differently across cultures and languages. In English for example the percentage sign is placed directly after the number, as in 10%.

Conversely, in Turkish, the sequence is reversed, with the percentage sign preceding the number, like %10.

Meanwhile, the French system has a space between the number and the percentage sign, producing 10 %.

Language/region Example Notes
English (US) 50% Percentage sign directly after the number.
French 50 % Space between number and percentage sign.
Turkish %50 Percentage sign before the number.
Arabic %٥٠ Arabic numerals with the percentage sign preceding it.
Chinese (China) 50% or 百分之五十 Uses the percentage sign or the phrase "百分之" before the number.

How to localize:

  • In JavaScript, use the Intl.NumberFormat, while NumberFormat works for Java.
  • When dealing with databases store percentages in a universal format so you can apply localization upon retrieval or display.
  • When possible let users choose their preferred format for display and make sure it covers major variations.

Units of measurement localization

The units of measurement we use to describe length, weight, volume, temperature and more are deeply rooted in history, culture and scientific conventions. While the metric system is widely accepted across many countries, other systems like imperial and US customary units are prevalent in United States, Myanmar and Liberia.

Notable differences in units of measurement across various regions include:

Measurement type Metric system US customary/imperial Other notable systems
Length Metres, cm Feet, inches Chi (China), Sun (Japan)
Weight Kilograms, g Pounds, ounces Stone (UK), Tahil (Malaysia)
Volume Litres, ml Gallons, quarts, pints Shi (Japan), Pint (UK different than US)
Temperature Celsius Fahrenheit Kelvin (Scientific use)
Area Square meters Square feet Pyeong (South Korea)
Speed km/h mph Knot (Nautical)

How to localize:

  • When designing an international product or website provide a feature that allows users to switch between units of measurement.
  • Use geolocation or browser settings to automatically detect a user’s location and adjust the default units of measurement accordingly. Remember to provide an option for users to manually change this if needed.
  • If your content targets a global audience always clarify which unit system you are referring to. For example "miles (mi)" or "kilometers (km)" can prevent confusion.
  • Many software libraries and APIs offer functionality to automatically convert between different units of measurement. For example:
    • JavaScript: The convert-units library can be used for converting between different units.
    • Python: The pint library provides a comprehensive system for unit conversion.
    • Java: The javax.measure package (part of the Java EE platform) allows for precise unit conversion and formatting.
    • C#/.NET: The UnitsNet library gives you everything you need for working with quantities and units.

Numeral systems localization

Numeral systems are the building blocks that define how we represent numbers.

While the Western or Hindu-Arabic numeral system (which includes the 0-9 digits we all know) is globally recognized, it may not be the local numeral system of your target country.

Another thing to consider when displaying numeric data is the writing direction. For example, Western numbers typically proceed from left to right. In contrast, Arabic and Persian numerals are scripted from right to left.

Culture/language Numeral presentation Writing direction
Western 123 Left-to-right
Arabic ١٢٣ Right-to-left
Hindi १२३ Left-to-right
Bengali ১২৩ Left-to-right
Chinese 一二三 Left-to-right
Thai ๑๒๓ Left-to-right
Persian ۱۲۳ Right-to-left
Tamil ௧௨௩ Left-to-right
Japanese 0, 1, 2, 3 (Western Arabic numerals are commonly used but native Kanji numerals also exist) Left-to-right

How to localize:

  • Make sure your platform or website can handle left-to-right and right-to-left languages.
  • Allow users to customize their preferred numeral system via platform settings.
  • Use system locale data to auto-format numbers according to user settings so numbers are always displayed in a format they’re familiar with.
  • Choose fonts that natively support the numeral system of your audience. Without the right font numbers may not be displayed or displayed incorrectly.
  • Test with native speakers to ensure numbers are displayed correctly and culturally sensitive.
  • Use specific libraries that help in numeral system conversions.

Pro tip: Use Centus - professional localization platform that can seamlessly integrate with your technologies, evolving with your needs and ensuring a smooth localization workflow. Learn more.

Get the week's best content!

By subscribing, you are agreeing to have your personal information managed in accordance with the terms of Centus Privacy Policy ->

Enjoyed the article?

Share it with your colleagues and partners 🤩