Documentation
SPHPlayground manual
sphplayground
sphplayground

I18n: Internationalization and localization

Internationalization (i18n) is the process of developing products in such a way that they can be localized for languages and cultures easily. Localization (l10n), is the process of adapting applications and text to enable their usability in a particular cultural or linguistic market.

This framework comes with buildin English to Finnish translations:

Human language translations

The Translator is the base interface for human language translation related operations. It supports both basic and plural Gettext style translation.

A translator without any translations will do nothing but return all messages verbatim.

A Translator implementation supports both basic and plural Gettext style translation. It has also a method similar to PHP's native vsprintf() function for both basic and plural translations. Additionally the class contain a method for translating a multidimensional array containing singular translatable message strings (plural form is not supported).

A Gettext object translates given input by using PHP's build in gettext extension.

Localized datetime and calendar translations

The DateFormatter supports following methods for Date and Time localization.