pybabel or other l10n libraries for PHP
Question: [Babel or pybabel](http://babel.edgewall.org/) is an interface to the CLDR
(Common Locale Data Repository) in Python. As such, it has the same
'knowledge' as PHP's i18n functions and classes (if the appropriate locales
are installed on the host), but without the hassle of using process-wide
settings like `setlocale()`.

Is there a similar library or toolkit for PHP? Especially to achieve:

  1. converting numbers to and fro language and region specific formats

  2. converting dates likewise

  3. accessing names, monetary and other information in a certain locale (like, e.g.
    
        >>> from babel import Locale
    >>> locale = Locale('en', 'US')
    >>> locale.territories['US']
    u'United States'
    >>> locale = Locale('es', 'MX')
    >>> locale.territories['US']
    u'Estados Unidos'
    


Answer: PHP 5.3 comes with [intl](http://www.php.net/manual/en/book.intl.php)
extension:

> Internationalization extension (further is referred as Intl) is a wrapper
> for ICU library, enabling PHP programmers to perform UCA-conformant
> collation and date/time/number/currency formatting in their scripts.

  1. Converting numbers is possible with _NumberFormatter_ class:
    
        $fmt = new NumberFormatter("de_DE", NumberFormatter::DECIMAL);
    echo $fmt->format(1234567.891234567890000);
    

  2. Converting dates is possible with _IntlDateFormatter_ class:
    
        $fmt = new IntlDateFormatter("en_US", IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'America/Los_Angeles', IntlDateFormatter::GREGORIAN);
    echo $fmt->format(0);
    

  3. Accessing names, monetary and other information in a certain locale is possible with _Locale_ class:
    
        echo Locale::getRegion('de-CH-1901');
    

In addition, there are _Collation_ and _MessageFormatter_ classes.

