class documentation

class DjangoTranslation(gettext_module.GNUTranslations):

View In Hierarchy

Set up the GNUTranslations context with regard to output charset.

This translation object will be constructed out of multiple GNUTranslations objects by merging their catalogs. It will construct an object for the requested language and add a fallback to the default language, if it's different from the requested language.

Method __init__ Create a GNUTranslations() using many locale directories
Method __repr__ Undocumented
Method ​_add​_fallback Set the GNUTranslations() fallback with the default language.
Method ​_add​_installed​_apps​_translations Merge translations from each installed app.
Method ​_add​_local​_translations Merge translations defined in LOCALE_PATHS.
Method ​_init​_translation​_catalog Create a base catalog using global django translations.
Method ​_new​_gnu​_trans Return a mergeable gettext.GNUTranslations instance.
Method language Return the translation language.
Method merge Merge another translation into this catalog.
Method ngettext Undocumented
Method to​_language Return the translation language name.
Instance Variable __language Undocumented
Instance Variable __locale Undocumented
Instance Variable __to​_language Undocumented
Instance Variable ​_catalog Undocumented
Instance Variable ​_info Undocumented
Instance Variable domain Undocumented
Instance Variable plural Undocumented
def __init__(self, language, domain=None, localedirs=None):
Create a GNUTranslations() using many locale directories
def __repr__(self):

Undocumented

def _add_fallback(self, localedirs=None):
Set the GNUTranslations() fallback with the default language.
def _add_installed_apps_translations(self):
Merge translations from each installed app.
def _add_local_translations(self):
Merge translations defined in LOCALE_PATHS.
def _init_translation_catalog(self):
Create a base catalog using global django translations.
def _new_gnu_trans(self, localedir, use_null_fallback=True):

Return a mergeable gettext.GNUTranslations instance.

A convenience wrapper. By default gettext uses 'fallback=False'. Using param use_null_fallback to avoid confusion with any other references to 'fallback'.

def language(self):
Return the translation language.
def merge(self, other):
Merge another translation into this catalog.
def ngettext(self, msgid1, msgid2, n):

Undocumented

def to_language(self):
Return the translation language name.
__language =

Undocumented

__locale =

Undocumented

__to_language =

Undocumented

_catalog =

Undocumented

_info =

Undocumented

domain =

Undocumented

plural =

Undocumented