<ul class="langswitcher">
{% for key, language in langswitcher.languages %}
    {% if key == langswitcher.current %}
    <li><a href="{{ page.url }}" class="active">{{  language.nativeName|capitalize }}</a></li>
    {% else %}
    <li><a href="{{ url(key~langswitcher.page_route) }}">{{  language.nativeName|capitalize }}</a></li>
    {% endif %}
{% endfor %}
</ul>

<ul class="langswitcher">
{% set langobj = grav['language'] %}

{% for key, language in langswitcher.languages %}

    {% if key == langswitcher.current %}
        {% set lang_url = page.url %}
        {% set active_class = 'active' %}
    {% else %}
        {% set lang_url = base_url_simple ~ langobj.getLanguageURLPrefix(key)~langswitcher.page_route ?: '/' %}
        {% set active_class = '' %}
    {% endif %}

    <li><a href="{{ lang_url }}" class="{{ active_class }}">{{  language.nativeName|capitalize }}</a></li>

{% endfor %}
</ul>

Add an active state to langswitcher link
Add an active state to langswitcher link
