Back to module index
Go to module by name
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.
Classes
GNUTranslations
add_fallback(self, fallback)
charset(self)
gettext(self, message)
info(self)
install(self, names=None)
lgettext(self, message)
lngettext(self, msgid1, msgid2, n)
ngettext(self, msgid1, msgid2, n)
npgettext(self, context, msgid1, msgid2, n)
output_charset(self)
pgettext(self, context, message)
set_output_charset(self, charset)
BE_MAGIC = 3725722773
CONTEXT = '%s\x04%s'
LE_MAGIC = 2500072158
VERSIONS = (0, 1)
NullTranslations
add_fallback(self, fallback)
charset(self)
gettext(self, message)
info(self)
install(self, names=None)
lgettext(self, message)
lngettext(self, msgid1, msgid2, n)
ngettext(self, msgid1, msgid2, n)
npgettext(self, context, msgid1, msgid2, n)
output_charset(self)
pgettext(self, context, message)
set_output_charset(self, charset)
Functions
Catalog
translation(domain, localedir=None, languages=None, class_=None, fallback=False, codeset=['unspecified'])
bind_textdomain_codeset
bind_textdomain_codeset(domain, codeset=None)
bindtextdomain
bindtextdomain(domain, localedir=None)
c2py
c2py(plural)
Gets a C expression as used in PO files for plural forms and returns a
Python function that implements an equivalent expression.
dgettext
dgettext(domain, message)
dngettext
dngettext(domain, msgid1, msgid2, n)
dnpgettext
dnpgettext(domain, context, msgid1, msgid2, n)
dpgettext
dpgettext(domain, context, message)
find
find(domain, localedir=None, languages=None, all=False)
gettext
gettext(message)
install
install(domain, localedir=None, codeset=['unspecified'], names=None)
ldgettext
ldgettext(domain, message)
ldngettext
ldngettext(domain, msgid1, msgid2, n)
lgettext
lgettext(message)
lngettext
lngettext(msgid1, msgid2, n)
ngettext
ngettext(msgid1, msgid2, n)
npgettext
npgettext(context, msgid1, msgid2, n)
pgettext
pgettext(context, message)
textdomain
textdomain(domain=None)
translation
translation(domain, localedir=None, languages=None, class_=None, fallback=False, codeset=['unspecified'])
Modules
os
re
sys