Template source: nav/languages-alternate-href.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 %}
{% for language in languages %}
    {% if language.code != CURRENT_LANGUAGE_CODE %}
        {% if not languages_filter or language.code in languages_filter %}
            {% language language.code %}
        <link rel="alternate" hreflang="{{ language.code }}" href="{{ domain }}{% nav_url language=language.code %}" />
            {% endlanguage %}
        {% endif %}
    {% endif %}
{% endfor %}