Because Un*x and Windows use different locale codes, PHPs setLocale() is not easily portable - I18Nv2::setLocale() attempts to provide this portability.
With I18Nv2 you can use standard locale codes like 'en_US' on both, Linux and Windows, though the list is far not complete yet, so if you stumble over a not covered locale (I18Nv2::$locales in I18Nv2::_main()), just drop a mail to the maintainer with the missing locale and its corresponding Win32 code.
Example 44-1. I18Nv2::setLocale()
|
I18Nv2 holds locale conventions returned by localeConv() stored statically, so they are easily accessible through I18Nv2::getInfo(). Have a look at the documentation of PHPs localeConv() for all available information.
Example 44-2. I18Nv2::getInfo()
|
I18Nv2 provides an easy way to utilize the ob_iconv_handler() through I18Nv2::autoConv().
Example 44-3. I18Nv2::autoConv()
|
I18Nv2_Locale is a formatter object that provides functionality to format dates, times, numbers and currencies in locale dependent conventions.
Example 44-4. I18Nv2_Locale
|
I18Nv2 provides a language, charset and locale negotiator for HTTP.
Example 44-5. I18Nv2_Negotiator
|
I18Nv2 provides translated lists of ISO language names.
Example 44-6. I18Nv2_Language
|
I18Nv2 provides translated lists of ISO country names.
Example 44-7. I18Nv2_Country
|
I18Nv2 provides decorated classes for country and language lists.
Example 44-8. I18Nv2_DecoratedList
|
Example 44-9. I18Nv2_CommonList::toDecoratedList()
|