annotate doc/intro.txt @ 609:01a75fec90f0 stable-0.9.x tip

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