{% extends 'partials/langswitcher-logic.html.twig' %}

{% block language_block_start %}
<li class="nav-item dropdown d-flex align-items-center">
    <a class="nav-link dropdown-toggle p-1" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
        {{ langswitcher.current|upper }}
    </a>
    <ul class="dropdown-menu dropdown-menu-end">
{% endblock %}

{% block language_block_end %}
    </ul>
</li>
{% endblock %}

{% block language_item %}
    {% if show_language and language != langswitcher.current %}
    <li><a class="dropdown-item" href="{{ lang_url ~ uri.params ~ (uri.query|length > 1 ? '?' ~ uri.query) }}">{{ language|upper }}</a></li>
    {% endif %}
{% endblock %}
