Examples

Examples -- Usage example for I18Nv2

API Documentation

Please see PEARs API Documentation for details on the API provided by I18Nv2.

Setting a locale

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.

Retrieving locale conventions

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.

Automatically transform output character set

I18Nv2 provides an easy way to utilize the ob_iconv_handler() through I18Nv2::autoConv().

Using I18Nv2_Locale

I18Nv2_Locale is a formatter object that provides functionality to format dates, times, numbers and currencies in locale dependent conventions.

Using I18Nv2_Negotiator

I18Nv2 provides a language, charset and locale negotiator for HTTP.

Using I18Nv2_Language

I18Nv2 provides translated lists of ISO language names.

Using I18Nv2_Country

I18Nv2 provides translated lists of ISO country names.

Using I18Nv2_Country

I18Nv2 provides decorated classes for country and language lists.

    Поддержать сайт на родительском проекте КГБ