CodePark/ questions / i18n basics
START PRACTICINGPRACTICE
Frontend question · Internationalization › i18n basics

What is the difference between internationalization (i18n) and localization (l10n)? What is a locale?

Internationalization (i18n) is engineering work you do once. You build the app so it can work in any language and region, without code changes. Localization (l10n) is the work you do for each market: translating the text and adapting it to one language and region.

The short names count the letters: "i", 18 letters, "n".

For example, i18n means:

  • All UI text lives in message files, not in the code.
  • Numbers, dates and prices go through a formatter like Intl, never hand-built strings.
  • The layout works for right-to-left languages and for longer text.
  • Messages use plural rules instead of count === 1 ? "item" : "items".

l10n then means translating the messages into French, choosing local images, and checking legal text for France.

A locale is a language plus regional settings, written as a BCP 47 language tag:

  • en-US is English as used in the United States.
  • en-GB is English in the United Kingdom.
  • ar-EG is Arabic in Egypt.
  • zh-Hant-TW is Chinese in Traditional script, in Taiwan.

The locale decides more than the language. en-US writes 3/9/2024 for 9 March, but en-GB writes 09/03/2024.

  • Internationalization prepares the code once so it can support any locale.
  • Localization adapts the content for one specific locale, mainly by translating it.
  • i18n work includes message files, Intl formatting, plural rules and RTL-ready layout.
  • A locale is a language plus a region, written as a tag like en-GB or ar-EG.
  • The locale controls formats like dates and numbers, not only the language.