There was an error while loading. Please reload this page.
1 parent 5d061e8 commit 7203d8fCopy full SHA for 7203d8f
1 file changed
layouts/_partials/language-switcher.html
@@ -1,4 +1,17 @@
1
-{{ if .IsTranslated }}
+{{ $showSwitcher := .IsTranslated }}
2
+{{ if .IsHome }}
3
+ {{ $showSwitcher = false }}
4
+ {{ $translations := .AllTranslations }}
5
+ {{ $hasAllHomeFiles := gt (len $translations) 1 }}
6
+ {{ range $translations }}
7
+ {{ if not .File }}
8
+ {{ $hasAllHomeFiles = false }}
9
+ {{ end }}
10
11
+ {{ $showSwitcher = $hasAllHomeFiles }}
12
+{{ end }}
13
+
14
+{{ if $showSwitcher }}
15
{{ $translations := .AllTranslations }}
16
<nav class="language-switcher" aria-label="{{ T "language.switcher" }}">
17
{{ range $translations }}
0 commit comments