utils.translation.ungettext_lazy()

ungettext_lazy(singular, plural, number) [source]

utils.translation.ugettext_lazy()

ugettext_lazy(message)

utils.translation.string_concat()

string_concat(*strings) Lazy variant of string concatenation, needed for translations that are constructed from multiple parts.

utils.translation.pgettext_lazy()

pgettext_lazy(context, message) Same as the non-lazy versions above, but using lazy execution. See lazy translations documentation.

utils.translation.pgettext()

pgettext(context, message) [source] Translates message given the context and returns it in a unicode string. For more information, see Contextual markers.

utils.translation.to_locale()

to_locale(language) [source] Turns a language name (en-us) into a locale name (en_US).

utils.translation.templatize()

templatize(src) [source] Turns a Django template into something that is understood by xgettext. It does so by translating the Django translation tags into standard gettext function invocations.

utils.translation.ngettext_lazy()

ngettext_lazy(singular, plural, number) [source]

utils.translation.ngettext()

ngettext(singular, plural, number) [source] Translates singular and plural and returns the appropriate string based on number in a UTF-8 bytestring.

utils.translation.override()

override(language, deactivate=False) [source] A Python context manager that uses django.utils.translation.activate() to fetch the translation object for a given language, activates it as the translation object for the current thread and reactivates the previous active language on exit. Optionally, it can simply deactivate the temporary translation on exit with django.utils.translation.deactivate() if the deactivate argument is True. If you pass None as the language argument, a NullTranslatio