Language selector
This commit is contained in:
parent
61ec226d10
commit
889cd3b1a8
2 changed files with 27 additions and 0 deletions
17
config.toml
17
config.toml
|
@ -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"}
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue