the code for my website (https://www.annwan.me)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

28 lines
859 B

<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 }}
{{ if eq $pageLang .Lang }}
<br/><span class="active">$ echo $LANG<br/><b>{{ .LanguageName }}</b></span><br/>
{{ else }}
<br/><a href="{{ $translation.Permalink }}">export LANG={{ .LanguageName }}; ./{{ $pageName }}</a><br/>
{{ end }}
{{ end }}
{{ end }}
{{ end }}
</p>
<br /><br />