sudoscientist.com/themes/risotto/layouts/partials/lang.html

23 lines
555 B
HTML
Raw Permalink Normal View History

<p>
{{ $siteLanguages := .Site.Languages }}
{{ $pageLang := .Page.Lang }}
{{ $currentPage := . }}
{{ $pageName := "" }}
{{ range .Site.Menus.main }}
{{ if eq ($currentPage.Permalink) (.URL | absLangURL) }}
{{ $pageName = .Name }}
{{ end }}
{{ end }}
{{ range .Page.AllTranslations }}
{{ $translation := .}}
{{ range $siteLanguages }}
{{ if eq $translation.Lang .Lang }}
{{ $selected := false }}
{{ end }}
{{ end }}
{{ end }}
</p>
<br /><br />