Template source: website/languages_menu.html

{% load i18n nav_tags %}
{% get_current_language as CURRENT_LANGUAGE_CODE %}
{% get_available_languages as LANGUAGES %}
{% get_language_info_list for LANGUAGES as languages %}
<li class="">
    <div class="change-language-forms">
    {% for language in languages %}
        {% if not languages_filter or language.code in languages_filter %}
        {% language language.code %}
        <form class="change-language-{{ language.code }}" action="{% url 'set_language' %}" method="POST" style="display:none;">
            {% csrf_token %}
            <input name="language" type="hidden" value="{{ language.code }}" />
            <input name="next" type="hidden" value="{% nav_url language=language.code %}" />
        </form>
        {% endlanguage %}
        {% endif %}
    {% endfor %}
    </div>
    {% for language in languages %}
    {% if language.code == CURRENT_LANGUAGE_CODE %}
    <a class="dropdown-toggle" id="dropdown-menu-lingua" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" href="#">{% nav_language_label language 'short_name' %}</a>
    {% endif %}
    {% endfor %}
    <div class="dropdown-menu" aria-labelledby="dropdown-menu-lingua">
	    {% for language in languages %}
	    {% if language.code != CURRENT_LANGUAGE_CODE %}
	    {% language language.code %}
	    <a class="dropdown-item " href="{% url 'set_language' %}?next={% nav_url language=language.code %}" onmouseover="$(this).attr('href', '{% nav_url language=language.code %}');" onclick="$(this).closest('li').find('form.change-language-{{ language.code }}').submit(); return false;">{% nav_language_label language 'short_name' %}</a> 
	    {% endlanguage %}
	    {% endif %}
        {% endfor %}
	</div>
</li>