themes/webapicTheme/templates/bundles/SyliusShopBundle/Menu/_localeSwitch.html.twig line 1

Open in your IDE?
  1. {% if locales|length > 1 %}
  2.     <div class="" id="sylius-locale-selector" {{ sylius_test_html_attribute('locale-selector') }}>
  3.         <span class="text sylius-active-locale" {{ sylius_test_html_attribute('active-locale') }}>
  4.             {# {{ active|sylius_locale_name }} #}
  5.             <i class="{{ active|sylius_locale_country|lower }} flag"></i>
  6.         </span>
  7.         <i class="angle down icon"></i>
  8.         <div class="menu">
  9.             {% for code in locales %}
  10.                 {% if code is not same as(active) %}
  11.                     {% if active|sylius_locale_country|lower == 'fr' %}
  12.                         <a href="{{ app_get_localurl() }}" class='us'>
  13.                     {% else %}
  14.                         <a href="{{ app_get_localurl() }}" class='fr'>
  15.                     {% endif %}
  16.                     {# <a href="{{ path('sylius_shop_switch_locale', {'code': code}) }}" class="item sylius-available-locale" {{ sylius_test_html_attribute('available-locale') }}> #}
  17.                         {# {{ code|sylius_locale_name }} #}
  18.                         <i class="{{ code|sylius_locale_country|lower }} flag"></i>
  19.                     </a>
  20.                 {% endif %}
  21.             {% endfor %}
  22.         </div>
  23.     </div>
  24. {% endif %}