{% load i18n %} {% comment %} Hidden language switcher form. It is rendered here (a library template included on every admin page via the {% templatetag openblock %} footer {% templatetag closeblock %} tag) so the feature works even when a project overrides admin/base_site.html. Baton's Menu.js picks it up by the data-baton-language-switcher attribute and turns it into a sidebar dropdown. Only rendered when i18n is usable: set_language is reachable and there is more than one available language. {% endcomment %} {% url 'set_language' as baton_set_language_url %} {% get_available_languages as BATON_LANGUAGES %} {% if baton_set_language_url and BATON_LANGUAGES|length > 1 %} {% get_current_language as BATON_CURRENT_LANGUAGE %}
{% endif %}