about summary refs log tree commit diff
path: root/layouts/partials/post-language-switcher.html
blob: 162cdf30e9ed6e83e37329eff32820db014d2f85 (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>
                    {{ upper .Lang }}
                </li>
            {{ else }}
                <li>
                    <a href="{{ .Permalink }}">{{ upper .Lang }}</a>
                </li>
            {{ end }}
        {{ end }}
    </ul>
{{ end }}