Why the .Language
object of a page doesn’t contains the LanguageCode
? Only .Site.LanguageCode
seams to exists.
Example of {{ .Page.Language | jsonify }}
:
{"Lang":"de","LanguageName":"Deutsch","Title":"XXX","Weight":20,"Disabled":false,"ContentDir":"content\\de","Cfg":{}}
When in the _config/languages.toml
we have:
[de]
title = "XXX"
contentDir = "content/de"
languageName = "Deutsch"
languageCode = "de-DE"
.languageCode
is neither on the page object nor on the language one:
can't evaluate field LanguageCode in type page.Page
can't evaluate field LanguageCode in type *langs.Language
It’s useful to have access to .LanguageCode
when using .Page.Translations
or.Site.Home.AllTranslations
for example.
Am I missing something? Is there a workaround to access LanguageCode
?