This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
ckanext-ozwillo-theme/ckanext/ozwillo_theme/templates/language_switcher.html

21 lines
667 B
HTML

{% set current_lang = request.environ.CKAN_LANG %}
{% set current_url = request.environ.CKAN_CURRENT_URL %}
<!-- LANGUAGE SWITCHER -->
<a class="dropdown-toggle" href="/" data-toggle="dropdown">
{% for locale in h.get_available_locales() %}
{% if locale == current_lang %}{{ locale.display_name or locale.english_name }}{% endif %}
{% endfor %}
<b class="caret"></b>
</a>
<ul class="dropdown-menu ">
{% for locale in h.get_available_locales() %}
{% if locale != current_lang %}
<li><a href="{% url_for current_url, locale=locale %}">{{ locale.display_name or locale.english_name }}</a></li>
{% endif %}
{% endfor %}
</li>
</ul>
<!-- //LANGUAGE SWITCHER -->