diff --git a/layouts/partials/theme/lang-selector.html b/layouts/partials/theme/lang-selector.html
index 38c59e74..cc529bf1 100644
--- a/layouts/partials/theme/lang-selector.html
+++ b/layouts/partials/theme/lang-selector.html
@@ -22,20 +22,13 @@
>
{{- range $.Page.AllTranslations -}}
- {{- $.Scratch.Set "translatedLang" .Language.Lang -}}
- {{- $.Scratch.Set "translatedUrl" "" -}}
- {{- range $.Page.Translations -}}
- {{- if eq .Language.Lang ($.Scratch.Get "translatedLang") -}}
- {{- $.Scratch.Set "translatedUrl" (.RelPermalink | safeURL) -}}
- {{- end -}}
- {{- end -}}
{{- if eq $.Site.Language.LanguageName .Language.LanguageName -}}
{{- .Language.LanguageName -}}
{{- else -}}
{{- .Language.LanguageName -}}