You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to suggest an update to the current theme template in order to correctly indicate the current language using the .Lang variable instead of the static values .site.LanguageCode and site.Language.Lang.
However, to accurately represent the current language, we should use the .Lang variable.
I propose updating the template as follows:
<htmllang="{{ with .Lang }}{{ . }}{{ else }}{{ site.LanguageCode | default site.Language.Lang }}{{ end }}" ...
With this change, the template will check if .Lang is defined and use it as the language value. If it is not defined, it will fallback to site.LanguageCode if available, or site.Language.Lang if neither .Lang nor site.LanguageCode are available.
This modification ensures that the template accurately reflects the current language being used.
Thank you for considering this improvement.
The text was updated successfully, but these errors were encountered:
I would like to suggest an update to the current theme template in order to correctly indicate the current language using the
.Lang
variable instead of the static values.site.LanguageCode
andsite.Language.Lang
.Currently, the template uses the following code:
However, to accurately represent the current language, we should use the
.Lang
variable.I propose updating the template as follows:
With this change, the template will check if
.Lang
is defined and use it as the language value. If it is not defined, it will fallback tosite.LanguageCode
if available, orsite.Language.Lang
if neither.Lang
norsite.LanguageCode
are available.This modification ensures that the template accurately reflects the current language being used.
Thank you for considering this improvement.
The text was updated successfully, but these errors were encountered: