Language selector

This commit is contained in:
Raoul 2018-04-23 18:13:15 +02:00
parent 61ec226d10
commit 889cd3b1a8
No known key found for this signature in database
GPG key ID: C7493D73B67C1842
2 changed files with 27 additions and 0 deletions

View file

@ -10,12 +10,29 @@ DefaultContentLanguageInSubdir = true
[Languages]
[Languages.de]
weight = 1
languageNames = {de = "Deutsch",
fr = "Französisch",
it = "Italienisch",
en = "Englisch"}
[Languages.fr]
weight = 2
languageNames = {de = "Allemand",
fr = "Français",
it = "Italien",
en = "Anglais"}
[Languages.it]
weight = 3
languageNames = {de = "Tedesco",
fr = "Francese ",
it = "Italiano",
en = "Inglese"}
[Languages.en]
weight = 4
languageNames = {de = "German",
fr = "French",
it = "Italian",
en = "English"}

View file

@ -52,4 +52,14 @@
</p>
{{ end }}
<p>
<strong>Sprache:</strong>
{{ if .IsTranslated }}
{{ range .Translations }}
<a href="{{ .Permalink }}">{{ index .Site.Params.languageNames .Lang }}</a>
{{ end }}
{{ end }}
</p>
</div>