{# -*- engine:django -*- #}

{% load i18n %}


<form action="{% url 'set_language' %}" method="post">
  {% csrf_token %}
  <input name="next" type="hidden" value="{{ request.get_full_path }}">

  {% get_current_language as LANGUAGE_CODE %}
  {% get_available_languages as LANGUAGES %}
  {% get_language_info_list for LANGUAGES as languages %}
  {% for language in languages %}
    <button type="submit" value="{{ language.code }}" name="language"
            class="blue-text text-lighten-4 btn-flat {% if language == LANGUAGE_CODE %} disabled {% endif %}">
      {{ language.code }}
    </button>
  {% endfor %}
</form>
