gettext.NullTranslations.output_charset()

output_charset() Return the “protected” _output_charset variable, which defines the encoding used to return translated messages in lgettext() and lngettext().

gettext.NullTranslations.ngettext()

ngettext(singular, plural, n) If a fallback has been set, forward ngettext() to the fallback. Otherwise, return the translated message. Overridden in derived classes.

gettext.NullTranslations.lngettext()

lngettext(singular, plural, n) If a fallback has been set, forward lngettext() to the fallback. Otherwise, return the translated message. Overridden in derived classes.

gettext.NullTranslations.lgettext()

lgettext(message) If a fallback has been set, forward lgettext() to the fallback. Otherwise, return the translated message. Overridden in derived classes.

gettext.NullTranslations.install()

install(names=None) This method installs self.gettext() into the built-in namespace, binding it to _. If the names parameter is given, it must be a sequence containing the names of functions you want to install in the builtins namespace in addition to _(). Supported names are 'gettext' (bound to self.gettext()), 'ngettext' (bound to self.ngettext()), 'lgettext' and 'lngettext'. Note that this is only one way, albeit the most convenient way, to make the _() function available to your applicat

gettext.NullTranslations.info()

info() Return the “protected” _info variable.

gettext.NullTranslations.gettext()

gettext(message) If a fallback has been set, forward gettext() to the fallback. Otherwise, return the translated message. Overridden in derived classes.

gettext.NullTranslations.charset()

charset() Return the “protected” _charset variable, which is the encoding of the message catalog file.

gettext.NullTranslations.add_fallback()

add_fallback(fallback) Add fallback as the fallback object for the current translation object. A translation object should consult the fallback if it cannot provide a translation for a given message.

gettext.NullTranslations

class gettext.NullTranslations(fp=None) Takes an optional file object fp, which is ignored by the base class. Initializes “protected” instance variables _info and _charset which are set by derived classes, as well as _fallback, which is set through add_fallback(). It then calls self._parse(fp) if fp is not None. _parse(fp) No-op’d in the base class, this method takes file object fp, and reads the data from the file, initializing its message catalog. If you have an unsupported message cata