class NullTranslations(gettext.NullTranslations, object):
Known subclasses: babel.support.Translations
Undocumented
Constant | CONTEXT_ENCODING |
Undocumented |
Constant | DEFAULT_DOMAIN |
Undocumented |
Method | __init__ |
Initialize a simple translations class which is not backed by a real catalog. Behaves similar to gettext.NullTranslations but also offers Babel's on *gettext methods (e.g. 'dgettext()'). |
Method | dgettext |
Like gettext(), but look the message up in the specified domain. |
Method | dngettext |
Like ngettext(), but look the message up in the specified domain. |
Method | dnpgettext |
Like npgettext, but look the message up in the specified domain . |
Method | dpgettext |
Like pgettext() , but look the message up in the specified domain . |
Method | ldgettext |
Like lgettext(), but look the message up in the specified domain. |
Method | ldngettext |
Like lngettext(), but look the message up in the specified domain. |
Method | ldnpgettext |
Equivalent to dnpgettext(), but the translation is returned in the preferred system encoding, if no other encoding was explicitly set with bind_textdomain_codeset(). |
Method | ldpgettext |
Equivalent to dpgettext(), but the translation is returned in the preferred system encoding, if no other encoding was explicitly set with bind_textdomain_codeset(). |
Method | lnpgettext |
Equivalent to npgettext(), but the translation is returned in the preferred system encoding, if no other encoding was explicitly set with bind_textdomain_codeset(). |
Method | lpgettext |
Equivalent to pgettext(), but the translation is returned in the preferred system encoding, if no other encoding was explicitly set with bind_textdomain_codeset(). |
Method | npgettext |
No summary |
Method | pgettext |
No summary |
Method | udgettext |
Like ugettext(), but look the message up in the specified domain. |
Method | udngettext |
Like ungettext() but look the message up in the specified domain. |
Method | udnpgettext |
Like unpgettext, but look the message up in the specified domain . |
Method | udpgettext |
Like upgettext() , but look the message up in the specified domain . |
Method | unpgettext |
No summary |
Method | upgettext |
No summary |
Instance Variable | _catalog |
Undocumented |
Instance Variable | _domains |
Undocumented |
Instance Variable | domain |
Undocumented |
Instance Variable | files |
Undocumented |
Instance Variable | plural |
Undocumented |
babel.support.Translations
Parameters | |
fp | a file-like object (ignored in this class) |
domain
.pgettext()
, but look the message up in the specified
domain
.Do a plural-forms lookup of a message id. singular
is used as the
message id for purposes of lookup in the catalog, while num
is used to
determine which plural form to use. The returned message string is an
8-bit string encoded with the catalog's charset encoding, if known.
If the message id for context
is not found in the catalog, and a
fallback is specified, the request is forwarded to the fallback's
npgettext() method. Otherwise, when num is 1 singular is
returned, and plural is returned in all other cases.
context
and message
id in the catalog and return the
corresponding message string, as an 8-bit string encoded with the
catalog's charset encoding, if known. If there is no entry in the
catalog for the message
id and context
, and a fallback has been
set, the look up is forwarded to the fallback's pgettext()
method. Otherwise, the message
id is returned.domain
.upgettext()
, but look the message up in the specified
domain
.Do a plural-forms lookup of a message id. singular
is used as the
message id for purposes of lookup in the catalog, while num
is used to
determine which plural form to use. The returned message string is a
Unicode string.
If the message id for context
is not found in the catalog, and a
fallback is specified, the request is forwarded to the fallback's
unpgettext() method. Otherwise, when num
is 1 singular
is
returned, and plural
is returned in all other cases.
context
and message
id in the catalog and return the
corresponding message string, as a Unicode string. If there is no entry
in the catalog for the message
id and context
, and a fallback has
been set, the look up is forwarded to the fallback's upgettext()
method. Otherwise, the message
id is returned.