
{% if languages|length > 1 %}
<div class="pull-left language-top">
  <form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-language">
    <div class="btn-group">

      <button class="btn btn-link dropdown-toggle btn-top-bar" data-toggle="dropdown">
      {# {% for language in languages %}
      {% if language.code == code %}
      <img src="catalog/language/{{ language.code }}/{{ language.code }}.png" alt="{{ language.name }}" title="{{ language.name }}">
      {% endif %}
      {% endfor %} #}
      <span class="">{{ text_language }}</span>&nbsp;<i class="fa fa-caret-down"></i></button>

      <ul class="dropdown-menu">
        {% for language in languages %}
        <li>
          <button class="btn btn-link btn-block language-select" type="button" name="{{ language.code }}"><img src="catalog/language/{{ language.code }}/{{ language.code }}.png" alt="{{ language.name }}" title="{{ language.name }}" /> {{ language.name }}</button>
        </li>
        {% endfor %}
      </ul>
    </div>
    <input type="hidden" name="code" value="" />
    <input type="hidden" name="redirect" value="{{ redirect }}" />
  </form>
</div>
{% endif %}
