{% if languages|length >= 1 %}
  <form action="{{ action }}" method="post" enctype="multipart/form-data" id="form-language">
    <div class="language">
	  <label>{{ text_language }}</label>
      <button class="btn btn-link btn-language dropdown-toggle" 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 }}">
	  {{ language.name }}
      {% endif %}
      {% endfor %}
	  <i class="zmdi zmdi-chevron-down zmdi-hc-fw"></i></button>
      <ul class="dropdown-menu">
        {% for language in languages %}
		 {% if language.code == code %}
			<li><button class="btn btn-link btn-block language-select item-selected" type="button" name="{{ language.code }}"><img src="catalog/language/{{ language.code }}/{{ language.code }}.png" alt="{{ language.name }}" title="{{ language.name }}" />{{ language.name }}</button></li>
		{% else %}
			<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>
		{% endif %}
      {% endfor %}
      </ul>
    </div>
    <input type="hidden" name="code" value="" />
    <input type="hidden" name="redirect" value="{{ redirect }}" />
  </form>
{% endif %}
