Making a global application with internationalization and localization

With the growing globalization levels, it's most likely that any website you write may be required to be in two or more languages. In Canada, English and French would be mandatory; in Switzerland, four languages could be asked for; and even in a (supposedly single-language) country like the United States, a Spanish version of the site could well be added to the English one. Of course, translation isn't enough: dates and currency amounts also require different formatting depending on the country, so we'll have to take care of that too.

Some definitions, now: being able to adapt your software to different languages is called internationalization, usually abbreviated as i18n—the 18 stands for the 18 letters between the initial i and the final n. Then, the specific process of configuring the system for a specific area is called localization, abbreviated as l10n for similar reasons as in i18n. Finally, if you really are into these numeronyms, the combination of internationalization and localization is also known as globalization, shortened to g11n.

This pair of definitions is based upon a document by the W3C, at https://www.w3.org/International/questions/qa-i18n. There, they define that "Internationalization is the design and development [...] that enables easy localization for target audiences that vary in culture, region, or language" and "Localization refers to the adaptation [...] to meet the language, cultural and other requirements of a specific target market (a locale)."

Fortunately, handling these aspects is simple in React, and only requires some planning ahead, as we'll see in this recipe.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.160.131