annotate doc/index.txt @ 103:1ba215a5774d

Add wrapper class bundling the various formatting functions bound to a specific locale and time-zone.
author cmlenz
date Wed, 13 Jun 2007 08:26:23 +0000
parents 98b27ffe1c3a
children 0b4796ed9426
rev   line source
4
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
1 .. -*- mode: rst; encoding: utf-8 -*-
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
2
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
3 =====
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
4 Babel
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
5 =====
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
6
16
03c36aaddaf8 Add a temporary/placeholder logo. Not the real thing, I promise ;-)
cmlenz
parents: 4
diff changeset
7 .. image:: logo_small.png
03c36aaddaf8 Add a temporary/placeholder logo. Not the real thing, I promise ;-)
cmlenz
parents: 4
diff changeset
8 :width: 158
03c36aaddaf8 Add a temporary/placeholder logo. Not the real thing, I promise ;-)
cmlenz
parents: 4
diff changeset
9 :height: 85
03c36aaddaf8 Add a temporary/placeholder logo. Not the real thing, I promise ;-)
cmlenz
parents: 4
diff changeset
10 :align: center
03c36aaddaf8 Add a temporary/placeholder logo. Not the real thing, I promise ;-)
cmlenz
parents: 4
diff changeset
11 :alt: Babel
03c36aaddaf8 Add a temporary/placeholder logo. Not the real thing, I promise ;-)
cmlenz
parents: 4
diff changeset
12 :class: logo
4
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
13
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
14 ---------------------------------------------------
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
15 Simple Internationalization for Python Applications
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
16 ---------------------------------------------------
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
17
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
18 Babel is an integrated collection of utilities that assist in
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
19 internationalizing and localizing Python applications, with an
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
20 emphasis on web-based applications.
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
21
75
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 40
diff changeset
22 * `Working with Message Catalogs <catalogs.html>`_
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 40
diff changeset
23 * `Locale Display Names <display.html>`_
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 40
diff changeset
24 * `Number and Date Formatting <formatting.html>`_
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 40
diff changeset
25 * `Command-Line Interface <cmdline.html>`_
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 40
diff changeset
26 * `Distutils/Setuptools Integration <setup.html>`_
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 40
diff changeset
27 * `Support Classes and Functions <support.html>`_
98b27ffe1c3a Extended the docs a bit.
cmlenz
parents: 40
diff changeset
28 * `Generated API Documentation <api/index.html>`_
4
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
29
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
30 Introduction
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
31 ------------
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
32
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
33 The functionality Babel provides for internationalization (I18n) and
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
34 localization (L10N) can be separated into two different aspects:
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
35
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
36 * tools to build and work with ``gettext`` message catalogs, and
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
37 * a Python interface to the CLDR (Common Locale Data Repository), providing
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
38 access to various locale display names, localized number and date
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
39 formatting, etc.
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
40
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
41 While the Python standard library includes a
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
42 `gettext <http://docs.python.org/lib/module-gettext.html>`_ module that enables
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
43 applications to use message catalogs, it requires developers to build these
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
44 catalogs using GNU tools such as ``xgettext``, ``msgmerge``, and ``msgfmt``.
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
45 And while ``xgettext`` does have support for extracting messages from Python
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
46 files, it does not know how to deal with other kinds of files commonly found
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
47 in Python web-applications, such as templates, nor does it provide an easy
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
48 extensibility mechanism to add such support.
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
49
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
50 Babel addresses this by providing a framework where various extraction methods
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
51 can be plugged in to a larger message extraction framework, and also removes
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
52 the dependency on the GNU ``gettext`` tools for common tasks, as these aren't
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
53 necessarily available on all platforms. See `Working with Message Catalogs`_
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
54 for details on this aspect of Babel.
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
55
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
56 Furthermore, while the Python standard library does include support for basic
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
57 localization with respect to the formatting of numbers and dates (the
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
58 `locale <http://docs.python.org/lib/module-locale.html>`_ module, among others),
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
59 this support is based on the assumption that there will be only one specific
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
60 locale used per process (at least simultaneously.) Also, it doesn't provide
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
61 access to other kinds of locale data, such as the localized names of countries,
40
496a5c3f9d6d Started implementation of datetime parsing, using a very basic approach for now.
cmlenz
parents: 16
diff changeset
62 languages, or time-zones, which are frequently needed in web-based applications.
4
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
63
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
64 For these requirements, Babel includes data extracted from the `Common Locale
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
65 Data Repository (CLDR) <http://unicode.org/cldr/>`_, and provides a number of
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
66 convenient methods for accessing and using this data. See `Locale Display
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
67 Names`_ and `Number and Date Formatting`_ for more information on this aspect
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
68 of Babel.
2cada72b40ae Forgot to check in the doc directory.
cmlenz
parents:
diff changeset
69
Copyright (C) 2012-2017 Edgewall Software