Lang attribute in base template question

In Release notes for v0.134.0 there is:

Then base template using

<html lang="{{ site.Language.LanguageCode }}"

What is the difference, benefit or correct way (in a single language and multi-language) of using the above instead of just:

<html lang="{{ .Site.LanguageCode }}"

This seems to work for multilanguage as intended, hence it needs to have site.Language. ?

site.LanguageCode is an undocumented alias to site.Language.LanguageCode. I imagine we will remove it at some point.

2 Likes

Thank you. Thats explain. Will go with site.Language.LanguageCode for futureproof.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.