I’ve been busting my head and can’t get around this.
This is what I have on my config.toml and I am trying to output the value of headline with {{ .Site.Language.Params.headline }} which keeps outputting blank. If I do try {{ .Site.Language.Params }} I do see the value there.
What am I doing wrong?
[Languages]
[Languages.en]
weight = 1
LanguageName = "English"
[Languages.en.params]
headline = "Tales of an hyperactive geek"
[Languages.en.menu]
[[Languages.en.menu.main]]
name = "About"
url = "/about/blog"
weight = 1
post = "This is more than meets the eye"
[Languages.pt]
weight = 2
LanguageName = "Portuguese"
[Languages.pt.params]
headline = "Contos de uma mente hiperactiva"
[Languages.pt.menu]
[[Languages.pt.menu.main]]
name = "Sobre"
url = "/about/blog"
weight = 1
post = "Isto é mais do que um blog"
I can’t find it right now, but somewhere in the docs there was a mention of just .Site.Language.Params and that does return a map of the string defined in config.toml.
But the problem is that you are missing the .en. and .pt. parts of your headlines parameters. So it’s normal to have blank output. You need to use the exact naming you specified in your config to access these parameters.
Then in my template {{ .Site.Language.Params.return }} is empty and {{ .Site.Language.Params}} returns a map (exactly the same as you have described it).
EDIT: the solution is {{ .Site.Language.Params.params.yourParamValue }}. Maybe something to consider for docs improvement