I would like to iterate over all translations to build a language switching div.
I would like to define the icon definition within the config.yml under
We are lenient in the config parsing and support a few variations, but I think your problem will be easier to undertand if you follow the example in the docs:
[languages]
[languages.en]
title = "My blog"
weight = 1
[languages.en.params]
linkedin = "https://linkedin.com/whoever"
[languages.fr]
title = "Mon blogue"
weight = 2
[languages.fr.params]
linkedin = "https://linkedin.com/fr/whoever"
[languages.fr.params.navigation]
help = "Aide"
Custom Params will be available in the language’s Site’s ´.Params`. So:
{{ .Site.Home.AllTranslations }}{{ .Lang }} {{ .Site.Params.icon }}{{ end }}
Etc.
Also note that we have made this simpler in Hugo 0.53 with the config dir support, as you can have params.de.toml etc.
Surely unlike me, you don’t leave in a country (hint: flag) where several official languages (hint: no flag) are spoken. We have so to agree that we disagree.