Step 2: Localization

The next step is Localization (L10n), which involves the translation of language properties and the adaptation of styles and functions to a different language or culture.

This is typically a back and forth process with Internationalization, when new language properties must be added, or translations must be updated when the initial text is modified.

For example, a translator will receive the following language property in English:

about.service: " is very helpful."

and will translate it to French:

about.service: " est très utile."

Each language property is made of two parts:

  1. the key, here about.service, identifies the property across translations;
    it is the fixed part of the property.
  2. the value is the variable part which changes from language to language:
    here " is very helpful." in English and " est très utile." in French.
Let me help you
at Step 2: Localization

Pitfalls: Pluralization and Gender Agreement

A static transformation of text is not enough for a full Localization: logic is needed to take into account plural and gender agreement.

This is typically done with functions written in a programming language, for example:

  var count = context["basket.count"];
    case 0:
      return "There are no items in your basket.";
    case 1:
      return "There is 1 item in your basket.";
      return "There are "+count+" items in your basket.";

The Language Plural Rules vary depending on the language. singular and plural are not enough to describe these rules: some languages have different forms of plural, for example, for 2, 12 and 100 items.

It is sometimes possible to define separate language properties for each category of singular and plural; in this case the complexity becomes to select the correct language property depending on the context:  "There are no items in your basket."   "There is 1 item in your basket."
basket.items.other: "There are #basket.count# items in your basket."