Localization with categories I am using Lindsey's Language Link plugin for my language switcher.

Everything works well, as long as the url is not a category url.

Here it is:

{% set element = (entry is defined ? entry : null) %}

{% for locale in craft.i18n.getSiteLocales %}
    &lt;a href="{{ ll(locale.id, element) }}" class="dropdown-item"&gt;{{ locale.nativeName|capitalize }}&lt;/a&gt;
{% endfor %}


Where can I tell Craft to used the translated slug in my language switcher?
If someone still is looking for an answer:

{% block locale__switch %}
    {# Loop through all of the site locales #}
    {% set otherLocales = craft.i18n.getSiteLocaleIds() %}

    {% for locale in otherLocales %}

        {# Check if site is category or Entry #}
        {% if category is defined %}
            {% set siteLocale = category.locale(locale) %}
        {% elseif entry is defined %}
            {% set siteLocale = craft.entries.id(entry.id).locale(locale).first %}
        {% endif %}

        {# Make sure that it's actually localized to this locale #}
        {% if siteLocale.locale == locale %}

            {# Output a link to it #}
            &lt;a href="{{ siteLocale.getUrl() }}" class="text-uppercase {% if craft.locale == siteLocale.locale %}active{% endif %}"&gt;{{ locale }}&lt;/a&gt;{% if not loop.last %} |{% endif %}
        {% else %}

            {# Output a link to the hompage #}
            &lt;a href="{{ craft.config.siteUrl[locale] }}"&gt;{{ locale }}&lt;/a&gt;
        {% endif %}
    {% endfor %}
{% endblock %}