view doc/index.txt @ 38:7ae4722af473 trunk

Started implementation of datetime parsing, using a very basic approach for now.
author cmlenz
date Tue, 05 Jun 2007 22:59:24 +0000
parents fc8b5515af7c
children 9bc73c0bf7e5
line wrap: on
line source
.. -*- mode: rst; encoding: utf-8 -*-

=====
Babel
=====

.. image:: logo_small.png
   :width: 158
   :height: 85
   :align: center
   :alt: Babel
   :class: logo

---------------------------------------------------
Simple Internationalization for Python Applications
---------------------------------------------------

Babel is an integrated collection of utilities that assist in
internationalizing and localizing Python applications, with an
emphasis on web-based applications.

* `Working with Message Catalogs <catalogs.html>`_
* `Locale Display Names <display.html>`_
* `Number and Date Formatting <formatting.html>`_
* `Command-Line Interface <cmdline.html>`_
* `Distutils/Setuptools Integration <setup.html>`_
* `Generated API Documentation <api/index.html>`_

Introduction
------------

The functionality Babel provides for internationalization (I18n) and
localization (L10N) can be separated into two different aspects:

 * tools to build and work with ``gettext`` message catalogs, and
 * a Python interface to the CLDR (Common Locale Data Repository), providing
   access to various locale display names, localized number and date
   formatting, etc.

While the Python standard library includes a
`gettext <http://docs.python.org/lib/module-gettext.html>`_ module that enables
applications to use message catalogs, it requires developers to build these
catalogs using GNU tools such as ``xgettext``, ``msgmerge``, and ``msgfmt``.
And while ``xgettext`` does have support for extracting messages from Python
files, it does not know how to deal with other kinds of files commonly found
in Python web-applications, such as templates, nor does it provide an easy
extensibility mechanism to add such support.

Babel addresses this by providing a framework where various extraction methods
can be plugged in to a larger message extraction framework, and also removes
the dependency on the GNU ``gettext`` tools for common tasks, as these aren't
necessarily available on all platforms. See `Working with Message Catalogs`_
for details on this aspect of Babel.

Furthermore, while the Python standard library does include support for basic
localization with respect to the formatting of numbers and dates (the
`locale <http://docs.python.org/lib/module-locale.html>`_ module, among others),
this support is based on the assumption that there will be only one specific
locale used per process (at least simultaneously.) Also, it doesn't provide
access to other kinds of locale data, such as the localized names of countries,
languages, or time-zones, which are frequently needed in web-based applications.

For these requirements, Babel includes data extracted from the `Common Locale
Data Repository (CLDR) <http://unicode.org/cldr/>`_, and provides a number of
convenient methods for accessing and using this data. See `Locale Display
Names`_ and `Number and Date Formatting`_ for more information on this aspect
of Babel.
Copyright (C) 2012-2017 Edgewall Software