add basic language switcher
This commit is contained in:
parent
61415ce5a7
commit
9011b604d2
|
@ -1,6 +1,13 @@
|
||||||
<footer>
|
<footer>
|
||||||
<div>
|
<div>
|
||||||
<div>[language switcher]</div>
|
{% set otherLang = page.url | locale_links | first %}
|
||||||
|
<a href="{{otherLang.url}}" lang="{{otherLang.lang}}" hreflang="{{otherLang.lang}}">
|
||||||
|
{% if otherLang.lang == "de" %}
|
||||||
|
Deutsche Version 🇩🇪
|
||||||
|
{% else %}
|
||||||
|
English Version 🇬🇧/🇺🇸
|
||||||
|
{% endif %}
|
||||||
|
</a>
|
||||||
<nav>
|
<nav>
|
||||||
{{ collections.footerNav | pageLang | eleventyNavigation | eleventyNavigationToHtml | safe }}
|
{{ collections.footerNav | pageLang | eleventyNavigation | eleventyNavigationToHtml | safe }}
|
||||||
</nav>
|
</nav>
|
||||||
|
|
Loading…
Reference in a new issue