hugo-theme-anubis2/layouts/partials/language-switcher.html
2021-11-07 15:20:24 +03:00

17 lines
464 B
HTML

{{ if .IsTranslated }}
{{ $pageLang := .Page.Lang}}
<ul class="language-select">
{{ range .AllTranslations }}
{{ if eq .Lang $pageLang }}
<li>
{{ .Language.LanguageName }}
</li>
{{ else }}
<li>
<a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
</li>
{{ end }}
{{ end }}
</ul>
{{ end }}