diff options
author | Gustavo Niemeyer <gustavo@niemeyer.net> | 2004-07-22 18:44:01 (GMT) |
---|---|---|
committer | Gustavo Niemeyer <gustavo@niemeyer.net> | 2004-07-22 18:44:01 (GMT) |
commit | 7bd33c5e22c67e06042fb7ab1186f7587d78153d (patch) | |
tree | 16506bbe1ea96afd7c579802ed92dd1eb8c62a14 /Doc/lib/liblocale.tex | |
parent | 5980ff2d924b55cf963e9fb69f41c86b45f4099a (diff) | |
download | cpython-7bd33c5e22c67e06042fb7ab1186f7587d78153d.zip cpython-7bd33c5e22c67e06042fb7ab1186f7587d78153d.tar.gz cpython-7bd33c5e22c67e06042fb7ab1186f7587d78153d.tar.bz2 |
This change implements the following gettext features, as
discussed recently in python-dev:
In _locale module:
- bind_textdomain_codeset() binding
In gettext module:
- bind_textdomain_codeset() function
- lgettext(), lngettext(), ldgettext(), ldngettext(),
which return translated strings encoded in
preferred system encoding, if
bind_textdomain_codeset() was not used.
- Added equivalent functionality in translate()
function and catalog classes.
Every change was also documented.
Diffstat (limited to 'Doc/lib/liblocale.tex')
-rw-r--r-- | Doc/lib/liblocale.tex | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Doc/lib/liblocale.tex b/Doc/lib/liblocale.tex index bc96189..c51bf20 100644 --- a/Doc/lib/liblocale.tex +++ b/Doc/lib/liblocale.tex @@ -469,15 +469,16 @@ that the \module{_locale} module is not accessible as a shared library. The locale module exposes the C library's gettext interface on systems that provide this interface. It consists of the functions \function{gettext()}, \function{dgettext()}, \function{dcgettext()}, -\function{textdomain()}, and \function{bindtextdomain()}. These are -similar to the same functions in the \refmodule{gettext} module, but use -the C library's binary format for message catalogs, and the C -library's search algorithms for locating message catalogs. +\function{textdomain()}, \function{bindtextdomain()}, and +\function{bind_textdomain_codeset()}. These are similar to the same +functions in the \refmodule{gettext} module, but use the C library's +binary format for message catalogs, and the C library's search +algorithms for locating message catalogs. Python applications should normally find no need to invoke these functions, and should use \refmodule{gettext} instead. A known exception to this rule are applications that link use additional C libraries which internally invoke \cfunction{gettext()} or -\function{cdgettext()}. For these applications, it may be necessary to +\function{dcgettext()}. For these applications, it may be necessary to bind the text domain, so that the libraries can properly locate their message catalogs. |