{% load i18n menu_tags cms_tags%}{% spaceless %}
{% get_available_languages as languages %}
{% get_current_language as current_language_code %}
{% if languages|length > 1 %}
    {% for code, name in languages %}
    {% get_language_info for code as lang %}
        {% if code == current_language_code %}
            <li class="topbar__menu__list__item topbar__menu__list__item--language topbar__menu__list__item--{{ code }} topbar__menu__list__item--active">
                <a class="topbar__menu__list__item__link" href="{% page_language_url code %}"
                title="{% blocktrans with code=lang.code|slice:":2" name=lang.name_translated %}{{ code }}, currently in {{ name }}{% endblocktrans %}">
                    {{ lang.code|slice:":2" }}
                </a>
            </li>
        {% else %}
            <li class="topbar__menu__list__item topbar__menu__list__item--language topbar__menu__list__item--{{ code }}">
                <a class="topbar__menu__list__item__link" href="{% page_language_url code %}"
                title="{% blocktrans with code=lang.code|slice:":2" name=lang.name_translated %}{{ code }}, switch to {{ name }}{% endblocktrans %}">
                    {{ lang.code|slice:":2" }}
                </a>
            </li>
        {% endif %}
    {% endfor %}
{% endif %}{% endspaceless %}
