{% if locales|length > 1 %}
    <div class="dropdown" id="sylius-locale-selector" {{ sylius_test_html_attribute('locale-selector') }}>
        <button class="btn btn-outline-secondary dropdown-toggle sylius-active-locale" data-toggle="dropdown" aria-haspopup="true" {{ sylius_test_html_attribute('active-locale') }}>{{ active|sylius_locale_name }}</button>

        <div class="dropdown-menu">
            {% for code in locales %}
                {% if code is not same as(active) %}
                    <a href="{{ path('sylius_shop_switch_locale', {'code': code}) }}" class="dropdown-item sylius-available-locale" {{ sylius_test_html_attribute('available-locale') }}>
                        {{ code|sylius_locale_name }}
                    </a>
                {% endif %}
            {% endfor %}
        </div>
    </div>
{% endif %}
