Open Pathsis opened 1 year ago
Yes we're using site.LanguageCode
here which is expecting the language to hold a languageCode
key. Not sure how your language settings are set but from a regular config file you should have:
languages:
en:
name: English
languageCode: en
fr:
name: Français
languageCode: fr-fr
I opened a ticket so that site.LanguageCode
defaults on the language key when languageCode
is not set for a given language.
Also, I think we can improve the theme to defaults on site.Language.Lang
itself.
Yes we're using
site.LanguageCode
here which is expecting the language to hold alanguageCode
key. Not sure how your language settings are set but from a regular config file you should have:languages: en: name: English languageCode: en fr: name: Français languageCode: fr-fr
I opened a ticket so that
site.LanguageCode
defaults on the language key whenlanguageCode
is not set for a given language.Also, I think we can improve the theme to defaults on
site.Language.Lang
itself.
The image above is a screenshot of the official demo, not my own website.
My parameters are set as follows.
When I don't set languageCode
, the language will always be en
; when I set languageCode = "zh"
, the language will always be zh
.
when I set languageCode = "zh", the language will always be zh. What do you mean by always? When navigating a language site, if that language as a
languageCode
set you should see as a html[lang] attribute this language'slanguageCode
We'll be fixing this on the theme pending soon (https://github.com/theNewDynamic/gohugo-theme-ananke/issues/615), but in the mean time, adding a languageCode
key should work.
Thanks for pointing the configuration issue of the demo site, we'll fix this as well.
Yes, I mean, when switching the language menu of the navigation, the head always shows one language.
After switching the site language, the header information shows that the site language is still the main language.