about summary refs log tree commit diff
path: root/layouts/partials/post-language-switcher.html
blob: 118edfb836c61ce624949eeb93fc12e82b1ed2f9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{{ if .IsTranslated }}
    {{ $pageLang := .Page.Lang}}
    <ul class="post-translations">
        {{ range .Page.AllTranslations }}
            {{ if eq .Lang $pageLang }}
                <li>
                    {{ .Language.LanguageName }} ({{ i18n "current" }})
                </li>
            {{ else }}
                <li>
                    <a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
                </li>
            {{ end }}
        {{ end }}
    </ul>
{{ end }}