gettext
index
/usr/local/lib/python2.3/gettext.py

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.

 
Modules
       
copy
os
re
struct
sys

 
Classes
       
NullTranslations
GNUTranslations

 
class GNUTranslations(NullTranslations)
     Methods defined here:
gettext(self, message)
ngettext(self, msgid1, msgid2, n)
ugettext(self, message)
ungettext(self, msgid1, msgid2, n)

Data and other attributes defined here:
BE_MAGIC = 3725722773L
LE_MAGIC = 2500072158L

Methods inherited from NullTranslations:
__init__(self, fp=None)
add_fallback(self, fallback)
charset(self)
info(self)
install(self, unicode=False)

 
class NullTranslations
     Methods defined here:
__init__(self, fp=None)
add_fallback(self, fallback)
charset(self)
gettext(self, message)
info(self)
install(self, unicode=False)
ngettext(self, msgid1, msgid2, n)
ugettext(self, message)
ungettext(self, msgid1, msgid2, n)

 
Functions
       
Catalog = translation(domain, localedir=None, languages=None, class_=None, fallback=False)
bindtextdomain(domain, localedir=None)
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=None, languages=None, all=0)
# Locate a .mo file using the gettext strategy
gettext(message)
install(domain, localedir=None, unicode=False)
ngettext(msgid1, msgid2, n)
test(condition, true, false)
Implements the C expression:
 
  condition ? true : false
 
Required to correctly interpret plural forms.
textdomain(domain=None)
translation(domain, localedir=None, languages=None, class_=None, fallback=False)

 
Data
        ENOENT = 2
__all__ = ['NullTranslations', 'GNUTranslations', 'Catalog', 'find', 'translation', 'install', 'textdomain', 'bindtextdomain', 'dgettext', 'dngettext', 'gettext', 'ngettext']