{#- Language switcher for the i18n plugin. Because the switcher lives in the header, Material's instant navigation does not update its links when the page content is swapped. We therefore compute the correct target URL client-side from the current path and force a full page load when a language is selected. -#} {% if config.extra.i18n_languages and page.i18n_alternates %} {% set i18n_locales = config.extra.i18n_languages | map(attribute='locale') | list %} {% set i18n_default_locale = config.extra.i18n_default_locale | d(config.theme.language, true) %}