about summary refs log tree commit diff
path: root/layouts/partials/post-language-switcher.html
blob: d5faf75ead345d6aa2d0a2bcd2b921efb34e0527 (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 .AllTranslations }}
            {{ if eq .Lang $pageLang }}
                <li>
                    {{ .Language.LanguageName }} ({{ i18n "current" }})
                </li>
            {{ else }}
                <li>
                    <a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
                </li>
            {{ end }}
        {{ end }}
    </ul>
{{ end }}