Over 10 years we help companies reach their financial and branding goals. Engitech is a values-driven technology agency dedicated.

Gallery

Contacts

411 University St, Seattle, USA

engitech@oceanthemes.net

+1 -800-456-478-23

Blog

Developing multilingual software goes through two stages: the first stage is internationalization, and the second stage is localization. In this article, we want to give a basic understanding of these two processes and how to implement them in software development.

Internationalization(i18n)

Internationalization is the process of creating a product that can be easily adapted for target markets that differ by culture, region, or language. 

For example, you have a website or application and your target market is not only one country but several. So, to expand the circle of users, you need to adapt it to different regions. And the most convenient and optimized way to do it is to create a product in which regional characteristics (text, pictures, date and time formats, etc.) will be placed in separate blocks that will be loaded when using a particular region/country. This set of resources is called the “locale”. As a result, adding a new locale shouldn’t require the change of the product source code.

Here are some general tips for implementing internationalization:

  • An obvious one – no hardcoded text, strings should be moved into resource files.
  • Avoid constructing strings through concatenation as this makes translation hard
  • It is not efficient to use different images for different locales, so avoid images with text. If you have text on top of an image, then it is better to implement the text as a separate layer on top.
  • Consider left-to-right and right-to-left languages
  • Make sure to have extra spaces for text expansion(UI)

Implementation of i18n is usually starting in the early stages of development to prepare your product for future localization. The point of i18n is all about making the localization process easier, faster and generating a multilingual product without repeated code.

Localization(l10n)

Now let’s talk about localization, it is a process of adapting a product to the characteristics of a particular region/country. And need to say, that it’s not just translating into another language, but also adapting it culturally. This process includes:

  • Translating text and related functions (e.g. sorting, searching, support for special characters, etc.)
  • Date and time format, time zones display
  • Support for currency and transactions if needed
  • Text direction
  • Culturally relevant graphics, images
  • Advertising

In addition, it may be necessary to adapt it even in the legal requirements of the target country. For example, the age of majority usually comes at the age between 18 to 21 depending on country. Therefore, when developing, for example, an online store with age restrictions, it is advised to take it into account.

The difference between internationalization and localization is that once your program goes through the i18n process, you can then repeat as many l10n processes as needed.

Useful tools for i18n

I18next is the most popular library for internationalization, it can be used to detect the user’s language, load translations, optionally cache the translations, and provide standard i18n features such as plurals, context, interpolation, etc.

Globalize: Uses the largest local data repository (CLDR) and provides number formatting and parsing, date and time formatting and parsing, currency formatting, message formatting (ICU message format pattern), and plural support.

Format.JS is a modular collection of JavaScript libraries for internationalization that are focused on formatting numbers, dates, and strings for displaying to people

Date-fns provides the most comprehensive, yet simple and consistent toolset for manipulating JavaScript dates in a browser & Node.js.

Polyglot.js is a small i18n helper library written in JavaScript, made to work both in the browser and CommonJS environments (Node). It provides a simple solution for interpolation and pluralization.

Conclusion

Internationalization and localization are interesting and complex processes that may take a decent amount of time and consideration. But these are very important aspects of modern applications to launch in the global market!

Aiema Kuseinova

Aiema Kuseinova

Frontend Engineer who loves working with UI and JS frameworks. In her free time she enjoys reading, watching movies, playing volleyball and practicing yoga.