blob: d90532779953f35dd7f9454965fd6ada959d60ea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
{{ if .Site.IsMultiLingual }}
<!-- Merge home and current page translations -->
{{ $langs := dict }}
{{ range .Site.Home.AllTranslations }}
{{ $langs = merge $langs (dict .Language.Lang .) }}
{{ end }}
{{ range .Translations }}
{{ $langs = merge $langs (dict .Language.Lang .) }}
{{ end }}
<div class="book-languages">
<ul>
<li class="flex">
<img src="{{ "svg/translate.svg" | relURL }}" />
{{ $.Site.Language.LanguageName }}
</li>
</ul>
<ul class="book-languages-list">
{{ range sort $langs }}
<li class="{{ if (eq $.Site.Language .Language ) }}active{{ end }}">
<a href="{{ .Permalink }}" class="flex">
<img src="{{ "svg/translate.svg" | relURL }}" />
{{ .Language.LanguageName }}
</a>
</li>
{{ end }}
</ul>
</div>
{{ end }}
|