JavaScript Editor Javascript validator     Web page editor 


Intro -- Introduction to I18Nv2


The work on I18Nv2 has actually started as a refactoring of I18N, but after some time I figured out that too many BC breaking changes were applied, so the release of a new major version was suggested.

Differences to I18N

I18N was modeled after Java OO practice and it provides a bunch of classes for each formatting action (numbers, currencies, dates).

I18Nv2 takes another approach and provides all formatting functionality within one class, which is I18Nv2_Locale.

I18Nv2_Locale is based upon PHPs builtin functionality of setlocale() , localeconv () and iconv related functions, while I18N completely depends on user contributed formatting rules.

I wouldn't say I18Nv2's approach is the better one, because it depends on the internationalization capabilities of the underlying operating system, but it's simpler and faster - though it is in need of user contributed date and time formatting rules.

I18N's translation functionality was dropped in favour of the new and shiny Translation2.

I18Nv2 still provides an HTTP negotiator to reveal the users preferred language/locale and charset.

I18Nv2 has translated lists of ISO country and language names for about 50 different languages. See I18Nv2_Country and I18Nv2_Language.

JavaScript Editor Javascript validator     Web page editor