Babel or pybabel 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:
converting numbers to and fro language and region specific formats
converting dates likewise
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'