Fix language dropdown not correctly setting lang

This commit is contained in:
Pk11 2021-10-25 03:12:59 -05:00
parent c861048b22
commit e29412a94d

View File

@ -43,7 +43,7 @@
{% for item in site[collection.label] %}
{% assign itemRef = item.url | split: item.lang | last %}
{% if itemRef == ref %}
<li><a class="dropdown-item{% if item.lang == page.collection %} active{% endif %}" data-language-id="{{ item.lang }}" href="{{ item.url | remove: "index.html" | remove: ".html" }}" dir="{% if site.data.rtl contains item.collection %}rtl{%else%}ltr{% endif %}">{{ site.data.lang-names[item.lang] }}</a></li>
<li><a class="dropdown-item{% if item.lang == page.collection %} active{% endif %}" lang="{{ item.lang }}" href="{{ item.url | remove: "index.html" | remove: ".html" }}" dir="{% if site.data.rtl contains item.collection %}rtl{%else%}ltr{% endif %}">{{ site.data.lang-names[item.lang] }}</a></li>
{% endif %}
{% endfor %}
{% endunless %}