Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 16469 программистов и 1660 роботов. Сейчас ищут 1725 программистов ...

Intro

Вернуться к: I18Nv2

Intro

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.



Вернуться к: I18Nv2

© 2024 «PHP.RU — Сообщество PHP-Программистов»
Главная | Форум | Реклама на сайте | Контакты VIP Сувениры
Разработка компании ODware