annotate doc/intro.txt @ 517:f5097a631192

Import of tzinfo is not necessary.
author jruigrok
date Sat, 05 Mar 2011 09:33:08 +0000
parents 5969b610d0ec
children
rev   line source
117
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
1 .. -*- mode: rst; encoding: utf-8 -*-
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
2
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
3 ============
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
4 Introduction
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
5 ============
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
6
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
7 The functionality Babel provides for internationalization (I18n) and
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
8 localization (L10N) can be separated into two different aspects:
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
9
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
10 * tools to build and work with ``gettext`` message catalogs, and
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
11 * a Python interface to the CLDR (Common Locale Data Repository), providing
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
12 access to various locale display names, localized number and date
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
13 formatting, etc.
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
14
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
15 .. contents:: Contents
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
16 :depth: 2
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
17 .. sectnum::
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
18
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
19
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
20 Message Catalogs
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
21 ================
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
22
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
23 While the Python standard library includes a
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
24 `gettext <http://docs.python.org/lib/module-gettext.html>`_ module that enables
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
25 applications to use message catalogs, it requires developers to build these
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
26 catalogs using GNU tools such as ``xgettext``, ``msgmerge``, and ``msgfmt``.
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
27 And while ``xgettext`` does have support for extracting messages from Python
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
28 files, it does not know how to deal with other kinds of files commonly found
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
29 in Python web-applications, such as templates, nor does it provide an easy
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
30 extensibility mechanism to add such support.
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
31
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
32 Babel addresses this by providing a framework where various extraction methods
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
33 can be plugged in to a larger message extraction framework, and also removes
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
34 the dependency on the GNU ``gettext`` tools for common tasks, as these aren't
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
35 necessarily available on all platforms. See `Working with Message Catalogs`_
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
36 for details on this aspect of Babel.
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
37
126
b12c6a776c44 Split docs on date and number formatting.
cmlenz
parents: 117
diff changeset
38 .. _`Working with Message Catalogs`: messages.html
117
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
39
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
40
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
41 Locale Data
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
42 ===========
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
43
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
44 Furthermore, while the Python standard library does include support for basic
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
45 localization with respect to the formatting of numbers and dates (the
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
46 `locale <http://docs.python.org/lib/module-locale.html>`_ module, among others),
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
47 this support is based on the assumption that there will be only one specific
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
48 locale used per process (at least simultaneously.) Also, it doesn't provide
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
49 access to other kinds of locale data, such as the localized names of countries,
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
50 languages, or time-zones, which are frequently needed in web-based applications.
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
51
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
52 For these requirements, Babel includes data extracted from the `Common Locale
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
53 Data Repository (CLDR) <http://unicode.org/cldr/>`_, and provides a number of
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
54 convenient methods for accessing and using this data. See `Locale Display
135
5969b610d0ec Minor doc fixes.
cmlenz
parents: 126
diff changeset
55 Names`_, `Date Formatting`_, and `Number Formatting`_ for more information on
5969b610d0ec Minor doc fixes.
cmlenz
parents: 126
diff changeset
56 this aspect of Babel.
117
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
57
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
58
0b4796ed9426 Added new logo.
cmlenz
parents:
diff changeset
59 .. _`Locale Display Names`: display.html
126
b12c6a776c44 Split docs on date and number formatting.
cmlenz
parents: 117
diff changeset
60 .. _`Date Formatting`: dates.html
b12c6a776c44 Split docs on date and number formatting.
cmlenz
parents: 117
diff changeset
61 .. _`Number Formatting`: numbers.html
Copyright (C) 2012-2017 Edgewall Software