From 28e7651268d916abe50bf3b8382a2956871a6aea Mon Sep 17 00:00:00 2001 From: Kai Stierl Date: Tue, 14 Apr 2020 00:27:51 +0200 Subject: [PATCH] stay on current page when switching languages --- layouts/partials/fragments/nav.html | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/layouts/partials/fragments/nav.html b/layouts/partials/fragments/nav.html index 99079a47..5dd5f200 100644 --- a/layouts/partials/fragments/nav.html +++ b/layouts/partials/fragments/nav.html @@ -101,12 +101,10 @@ {{- end }} {{- if .Site.IsMultiLingual -}} - {{- range .Site.Languages }} - {{- if ne .Lang $.Site.Language.Lang -}} - - {{ .LanguageName }} - - {{- end -}} + {{- range $.root.Page.Translations }} + + {{ .Language.LanguageName }} + {{- end -}} {{- end }}