src/CoreBundle/Resources/views/Partials/languageSwitch.html.twig line 1

Open in your IDE?
  1. <ul>
  2.     {% for link, text in get_localized_links() %}
  3.         {% if (language is defined and language == text) %}
  4.             {% set path = ('static/CorporateBundle/img/flags/' ~ text ~ '.png') %}
  5.             <li><img alt="" src="{{ asset(path) }}"/></li>
  6.         {% endif %}
  7.     {% endfor %}
  8.     {% for link, text in get_localized_links() %}
  9.         {% if not (language is defined and language == text) %}
  10.             <li>
  11.                 {% set path = ('static/CorporateBundle/img/flags/' ~ text ~ '.png') %}
  12.                 <a href="{{ link }}"><img alt="" src="{{ asset(path) }}"/></a>
  13.             </li>
  14.         {% endif %}
  15.     {% endfor %}
  16. </ul>