Internationalization (I18N)

Definition

I18N: Making an application locale-independent

Internationalization (i18n) is the process of designing a software or Web application to handle different linguistic and cultural conventions without additional engineering. Central to internationalization is the separation of language and cultural data from the source code.

L10N: Adapting and translating an application for a specific locale

Localization (l10n) is the process of adapting a product to the requirements of a target locale. This involves the translation of the user interface (UI) - including text messages, icons, buttons etc. -, of the online help, and of any documentation and packaging, and the addition of cultural data and language-dependent components, such as spell-checkers, input methods and so forth.

I18N = N * L10N

In particular, internationalization involves:

  • Ensuring that all localizable elements are extracted from the source code (e.g. by collecting all localizable items in external resource files);
  • Ensuring that the design of the user interface (UI) is flexible and neutral;
  • Ensuring that the relevant characters set is supported;
  • Ensuring that regional standards are supported:
    • locale-specific formats - time/date, numbers, phone numbers / zip codes etc.
    • locale-specific units - currency, weights etc
    • locale-specific sorting rules (collating)
    • writing direction (left-to-right, right-to-left, or bi-directional)

PHP and i18n

I18N support in PHP is not as strong as in Java. You have to roll your own i18n support classes.

To make your application global, its best to use Unicode, which supports nearly all languages and scripts in the world. Take care when using Unicode (UTF-8) in PHP: Not all functions will work as expected. More on this on the charsets page.

TODO: Add notes about setting locale in PHP.

WACT and I18N

The WACT framework itself is not i18nized yet. Hopefully this will change in future versions:

Wishlist:

  • i18n tags and/or filters for locale-specific formats (date/time, numbers, currency etc)
  • locale-specific form validation
  • locale-specific framework/error messages
  • Unicode support?

Some relevant features are already available: the Multi-Lang Fileschemes and using language-specific ini-files with UI texts.

The WACT based LIMB CMS already has most of the above-mentioned features, even though the developers stated that they consider these features as still very basic. Maybe these can be integrated into WACT later?

Related WACT Pages

External Resources

 
php/i18n.txt · Last modified: 2005/12/30 07:49 by 84.72.37.105 (harryf)
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki