Localization and Internationalization

Internationalization and localization

A cat holding a globe

Localization and Internationalization make content accessible and improve user experience for a multilingual audience.

Internationalization comes before localization and adds multilingual support at the code architecture level, while localization provides content tailored to the required language environment.

Together, they are referred to as globalization.

Internationalization (I18N) ?

Internationalization

Internationalization is configured on the server side, selecting:

  • supported languages: ru, en, fr, de, es, it, pt, nl, pl, ja and so on
  • text encoding to support the selected languages: the universal standard is UTF-8
  • client locale detection mechanism: typically determined
    from the header value sent by the browser in the
    HTTP request Accept-Language: ru-RU,ru;q=0.9,en-US;q=0.8
    The q weight assigns the language preference in the range of 0 to 1, where 1 is the highest priority.
  • logic for switching language by the client:

Localization (L10N) ?

Localization

Localization happens after the application is internationalized and includes:

  • translation of texts and interface elements for supported languages:
  • formatting of
    • dates: 01.01.2025, 01/01/2025
    • numbers: 1.234,56, 1,234.56
    • currencies: 1 234,56 ₽, $1,234.56
    • addresses and phone numbers
  • translation of measurement units: for example, 30 °C = 86 °F
  • consideration of regional cultural features when using images and texts

Testing Internationalization and Localization

When testing, it’s essential to verify that:

  1. Client locale is automatically detected (if the mechanism is implemented).
    You can test this by sending different values of header
    Accept-Language
  2. The default language is displayed when the client requests an unsupported language.
  3. The correct encoding is set, and the characters of supported language alphabets display correctly.
    On the client, incorrect encoding might appear as:
  4. All messages are translated.
    In case of an error, the client might display unpopulated message keys:
  5. Language changes when switched by the client via the interface.
    Ensure all interface elements update after the language change.
  6. Formats for dates, numbers, and currencies change when the locale changes.
  7. Text displays correctly considering text direction, for example, right-to-left for Arabic.
  8. Layout doesn’t break, and text doesn’t overflow elements when the language changes.
Task
Task available to premium users!
Sidebar arrow