diff options
Diffstat (limited to 'layouts/partials/language-switcher.html')
-rw-r--r-- | layouts/partials/language-switcher.html | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/layouts/partials/language-switcher.html b/layouts/partials/language-switcher.html new file mode 100644 index 0000000..af29a78 --- /dev/null +++ b/layouts/partials/language-switcher.html @@ -0,0 +1,11 @@ +{{ i18n "choose language" }} +{{ $pageLang := .Page.Lang}} +<nav> + {{ range .AllTranslations }} + {{ if eq .Lang $pageLang }} + <a>{{ .Language.LanguageName }} ({{ i18n "current" }})</a> + {{ else }} + <a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a> + {{ end }} + {{ end }} +</nav> |