i18next.templatetags package

Submodules

i18next.templatetags.i18next module

class i18next.templatetags.i18next.OverrideLocaleNode(language_code, nodelist)[source]

Bases: django.template.base.Node

Node for overridelocale.

render(context)[source]
i18next.templatetags.i18next.overridelocale(parser, token)[source]

Overrides locale for certain code block.

Example usage:

{% overridelocale 'en' %}
    <p>
        <a href="/login/">{% trans "Log in" %}</a>
    </p>
{% endoverridelocale %}
class i18next.templatetags.i18next.DisableTranslationsNode(nodelist)[source]

Bases: django.template.base.Node

Node for disabletranslations.

render(context)[source]
i18next.templatetags.i18next.disabletranslations(parser, token)[source]

Disables translations for the block.

Example usage:

{% disabletranslations %}
    <p>
        <a href="/login/">{% trans "Log in" %}</a>
    </p>
{% enddisabletranslations %}

Module contents