annotate doc/intro.txt @ 556:454fe7a76877 tip

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