{% set current_lang = request.environ.CKAN_LANG %}
<form class="lang-select" action="{% url_for 'util.internal_redirect' %}" data-module="select-switch" method="POST">
  {{ h.csrf_input() }}
  <div class="form-group">
    <label for="field-lang-select">{{ _('Language') }}</label>
    <select id="field-lang-select" name="url" data-module="autocomplete" data-module-dropdown-class="lang-dropdown" data-module-container-class="lang-container">
      {% for locale in h.get_available_locales() %}
        <option value="{% url_for h.current_url(), locale=locale.short_name %}" {% if locale.short_name == current_lang %}selected="selected"{% endif %}>
          {{ locale.display_name or locale.english_name }}
        </option>
      {% endfor %}
    </select>
  </div>
  <button class="btn btn-secondary d-none " type="submit">{{ _('Go') }}</button>
</form>


