templates/front/layouts/menu_languages.html.twig line 1

Open in your IDE?
  1. {% for language in languages %}
  2.     <li class="nav-item text-center space-lang" >
  3.         {% set loc = language.code %}
  4.         <a  style="cursor:pointer"
  5.             class="nav-link {% if  app.request.getLocale() == language.code %} fr {% endif %} size-lang"  
  6.             {% if  app.request.attributes.get('_route_params')['slug'] is defined  %} 
  7.                 data-slug="{{ app.request.attributes.get('_route_params')['slug'] }}"
  8.             {% endif %}
  9.             data-route="{{ app.request.attributes.get('_route') }}"
  10.             data-localecurrent="{{ app.request.getLocale() }}"
  11.             data-langselected="{{ language.code }}"
  12.             data-href="{{ path(app.request.attributes.get('_route'),app.request.attributes.get('_route_params')) }}"
  13.           > {{ (language.code | capitalize) }}
  14.         </a>
  15.     </li>
  16. {% endfor %}