{{ range .Page.AllTranslations }}
Yep, this part says “range all translations of this current page”. If there is none no language is shown.
From another post directly answered by bep:
I’m writing this quick and untested:
- .AllTranslations will give you a an ordered list of all translations of a Page, including the current one.
- .Site.Home.AllTranslations will give you all “home pages”
Sidennote: this part here is useless because it does the same in either case. Just leave line 2 or 4 and remove the rest.
{{ if eq $pageLang .Lang}}
{{ .LanguageName }}
{{ else }}
{{ .LanguageName }}
{{ end }}