about:cmlenz – Announcing Babel
So here we are: Babel is intended to address these concerns. It bundles a “pre-compiled” version of the Common Locale Data Repository (CLDR), which contains a whole lot of information about many of the worlds different locales. Based on that data, it implements localized date and number formatting (and in a way that doesn’t require setting the process-wide locale via the
localemodule.) It provides data such as the translated names of many of the worlds countries, languages, time-zones, currencies, and more.
That’s the part that’s comparable to the functionality provided by
zope.i18nand PyICU. But there’s more. Babel also implements an extensible message catalog extraction system that we think is a better fit for Python applications than good old
xgettext. It comes with an extractor for Python source files, but extractors for other source files can be added by third-party packages. The latest release of Genshi, 0.4.2, comes with a Babel plugin that provides simple message extraction from markup and text templates.
Babel does not have any hard dependencies outside of Python itself (there’s a dependency on setuptools for the lookup of extractor plugins, but we intend to soften that link in an upcoming release). It’s not tied into any particular framework or larger system. It tries to provide functionality in a way that encourages other projects to use it and contribute back, instead of everyone rolling their own limited I18n functionality over and over again.