gettext

Internationalization and localization support.

This module provides internationalization (I18N) and localization (L10N) support for your Python programs by providing an interface to the GNU gettext message catalog library.

I18N refers to the operation by which a program is made aware of multiple languages. L10N refers to the adaptation of your program, once internationalized, to the local language and cultural habits.

Functions

Catalog(domain[, localedir, languages, ...])
bind_textdomain_codeset(domain[, codeset])
bindtextdomain(domain[, localedir])
c2py(plural) Gets a C expression as used in PO files for plural forms and returns a Python lambda function that implements an equivalent expression.
dgettext(domain, message)
dngettext(domain, msgid1, msgid2, n)
find(domain[, localedir, languages, all])
gettext(message)
install(domain[, localedir, unicode, ...])
ldgettext(domain, message)
ldngettext(domain, msgid1, msgid2, n)
lgettext(message)
lngettext(msgid1, msgid2, n)
ngettext(msgid1, msgid2, n)
test(condition, true, false) Implements the C expression:
textdomain([domain])
translation(domain[, localedir, languages, ...])

Classes

GNUTranslations([fp])
NullTranslations([fp])