{% set current_lang = request.environ.CKAN_LANG %}

<div class="language-switch">
  <ul>
    <li>
      {% for locale in h.get_available_locales() %}
        {% if (locale.identifier!=current_lang) and ((locale.short_name=='de') or (locale.short_name=='en')) %}
        <a title="{{ _('Switch to ... website') }}" href="{% url_for h.current_url(), locale=locale.short_name %}"
           xml:lang="{{ locale.short_name }}" hreflang="{{ locale.short_name }}" lang="{{ locale.short_name }}">{{ locale.short_name.upper() }}</a>
        {% endif %}
      {% endfor %}
    </li>
  </ul>
</div>