A Concise Guide to Number Localization

Often overlooked and often critical to international sales, knowledge of localized number formatting can go a long way to providing better user experiences in our internationalized apps and websites.

Imagine checking out of an e-commerce store and seeing your order total as $1,423.01, and later seeing $2,099.94 appear on your credit card bill. Your cart at checkout was shown in US dollars, but since you live in Australia, you naturally assumed that the amount was in Australian dollars. The currency was converted largely behind the scenes, and you ended up paying almost 150% of what you thought you were going to pay. That would be a nightmare scenario for the store since they’ve probably just lost you and countless others as returning customers. While this is an extreme example, it just goes to show how important number and currency localization is to both UX and our bottom line as software developers. In this guide, we’ll cover what every developer should know about number localization: numeral systems, currency representation, and percentages.

Numeral Systems: the 1, 2, 3s of Number Localization

When localizing numbers, it’s important to have an idea of the different numeral systems that exist in the world. A numeral system is a written representation of numbers. The Western Arabic numeral system—which has the digit symbols 0, 1, 2, 3, 4, 5, 6, 7, 8, 9—is very common in Western locales. Not all languages use Western Arabic digits, though. Bengali, for example, uses the Bengali–Assamese numeral system, whose digits differ from the Western Arabic system: , , , , , , , , , .


The same numbers represented in the Western Arabic and Bengali numeral systems

✋🏽 Heads up! » Many languages have adapted to use Western Arabic numerals in modern times. It’s worth researching the locales your app or website supports to see if they officially use Western Arabic numerals or not.

It’s important to be aware of local conventions when working with numbers. In some locales like Saudi Arabia, for example, it’s common to represent numbers in the local numeral system, Eastern Arabic, and not the Western Arabic system.

Fonts factor into our number localization as well. When we select fonts for our digital products we may want to make sure that they support all the numeral systems we need. Most operating systems today do a good job of falling back to system fonts when they encounter characters that the currently active font doesn’t support. This means that we can often use custom fonts that don’t include all the numeral systems we support without numbers turning into gibberish on us.

However, it’s worth considering international numeral systems when doing UX research for our apps and websites. An international stock exchange app may need to represent all kinds of numeral systems, for example, and our font selection process may need to be sensitive to this. In all cases, we should always test our apps and websites on different platforms to see how our numeral systems are being rendered for our users.

Separators: Breaking Up Large Numbers

When representing large numbers, it often helps legibility to break up the numbers into digit groups. In many English locales we’re used to separating thousands with a comma, and to separate the integer and fraction parts of a number with a point—like 1,234,567.89. However, it’s important to be aware that different locales separate digit groups differently. In French (and even in some English locales), for example, it’s common to separate groups of thousands with space and to separate an integer and a fraction with a comma—like 1 234 567,89. Some locales only separate the integer portion of a number, while others separate both the integer and fractional portions.

The Indian numbering system is unique in that it groups the three rightmost digits of an integer together, and separates digits to the left of that group into pairs, e.g. 12,34,567.89


The same number separated differently in different languages

🔗 Resource » Scientific and technical standards exist for formatting numbers, including rules for separating digit groups. If your app or website is targeting a scientific or technical audience, you may want to look at these standards.

Currency Localization

Localizing currency involves using symbols or codes to indicate the currency of the current number. Depending on the context, a special symbol ($ or US$), or an ISO 4217 currency code (USD) is used to represent the currency.

Some locales place the currency symbol to the left of the number, while others place the symbol to the right.

Some currencies are represented by letters in their locale’s language. The United Arab Emirates dirham, for example, is represented with the letters د.إ, which is the Arabic acronym for “Emirati dirham”.

There are also unofficial abbreviations to currencies, and they’re commonly used within a country to represent its currency. The aforementioned Emirati dirham is sometimes unofficially represented with the Latin characters “DH” or “Dhs”.


The same number represented in different currencies

When the currency we’re working in isn’t obvious from the context, we would probably want to use either the ISO 4217 code or a disambiguated symbol to represent the currency. For example, the $ symbol can represent the American, Canadian, or Singapore dollar—among many others—depending on the context. In fact, the $ can represent currencies that aren’t dollars, like the Argentinian peso. If there’s any chance of confusion, using a disambiguated form of the currency symbol (US$) or the ISO code (USD) can make things clear for our apps’ customers—which usually results in more sales & revenue for us.

📖 Go deeper » We haven’t mentioned currency exchange because it’s a bit outside the scope of this article. However, it’s worth noting that there are APIs that offer currency exchange services. On example is the currencylayer API: it’s trusted by large corporations and has a free tier that allows you to try it out.

Percentages

The common percent sign (%) may seem like it would be uniform across all locales, but that’s not actually the case. Different locales use different symbols for the percent sign. And like currency symbols, the percent sign can go to the left or right of its associated number depending on the locale.


The same percentage shown in different locales

Development Strategy

When developing our apps and websites, it’s probably wise to adopt a robust localization library that will do the heavy lifting of number localization for us. Many languages have localization in their official standard libraries. JavaScript, for example, has the Intl.NumberFormat object for formatting localized numbers, optionally as currencies or percentages.

Demo

Here’s a little demo that we built for you using JavaScript. You can use it to experiment with different combinations of locales, number systems, and currencies, and see how they can be rendered together for your users.

See the Pen
Numbers & Currency Localization
by Mohammad Ashour (@mashour)
on CodePen.

C’est Fini

We hope you enjoyed this brief guide to numbers and currency localization. For localizing more than just numbers, check out Phrase. It’s is a fully-featured, professional localization solution made for product managers, developers, and translators. With a flexible API, powerful web console, and expert features like branching, OTA (over the air) translations, and machine translations, Phrase greases the gears of your translation team and helps you focus on your app’s features, not merging string files. Check out all the Phrase features, and sign up for a free 14-day trial.

A Concise Guide to Number Localization
5 (100%) 10 votes
Author
Mohammad Phrase Content Team
Comments