{% if languages|length > 1 %}
<div class="pull-left">
  <form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-language">
    <div class="btn-group">
      <button class="btn btn-link dropdown-toggle" data-toggle="dropdown">
      {% for language in languages %}
      {% if language.code == code %}
      <img src="{{ language.image }}" alt="{{ language.name }}" title="{{ language.name }}">
      {% endif %}
      {% endfor %}
      <span class="hidden-xs hidden-sm hidden-md">{{ text_language }}</span>&nbsp;<i class="fa fa-caret-down"></i></button>
      <ul class="dropdown-menu w600">
        {% for language in languages %}
        <li class="fl200">
          <button class="btn btn-link btn-block language-select" type="button" name="{{ language.code }}"><img src="{{ language.image }}" alt="{{ language.name }}" title="{{ language.name }}" style="width: 20px;height: 20px;" /> {{ language.name }}</button>
        </li>
        {% endfor %}
      </ul>
    </div>
    <input type="hidden" name="code" value="" />
    <input type="hidden" name="redirect" value="{{ redirect }}" />
  </form>
</div>
{% endif %}
