{{ if .IsTranslated }}
    {{ $pageLang := .Page.Lang}}
    <span>
        <ul class="post-translations">
            {{ range (sort .AllTranslations ".Lang" "asc" ) }}
                {{ if eq .Lang $pageLang }}
                    <li>
                        {{ upper .Lang }}
                    </li>
                {{ else }}
                    <li>
                        <a href="{{ .Permalink }}">{{ upper .Lang }}</a>
                    </li>
                {{ end }}
            {{ end }}
        </ul>
    </span>
{{ end }}