mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-15 11:34:47 -04:00
Describe .Language.LanguageCode fallback value
Co-authored-by: chalin <chalin@users.noreply.github.com>
This commit is contained in:
parent
3336532fe5
commit
efad994ee0
@ -328,8 +328,11 @@ See [image processing configuration](/content-management/image-processing/#imagi
|
||||
|
||||
(`string`) A language tag as defined by [RFC 5646](https://datatracker.ietf.org/doc/html/rfc5646). This value is used to populate:
|
||||
|
||||
- The `<language>` element in the internal [RSS template](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/_default/rss.xml)
|
||||
- The `lang` attribute of the `<html>` element in the internal [alias template](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/alias.html)
|
||||
- The `<language>` element in the embedded [RSS template]({{% eturl rss %}})
|
||||
- The `lang` attribute of the `<html>` element in the embedded [alias template]({{% eturl alias %}})
|
||||
- The `og:locale` `meta` element in the embedded [Open Graph template]({{% eturl opengraph %}})
|
||||
|
||||
When present in the root of the configuration, this value is ignored if one or more language keys exists. Please specify this value independently for each language key.
|
||||
|
||||
###### languages
|
||||
|
||||
|
@ -34,7 +34,7 @@ Lang
|
||||
```
|
||||
|
||||
LanguageCode
|
||||
: (`string`) The language code from the site configuration.
|
||||
: (`string`) The language code from the site configuration. Falls back to `Lang` if not defined.
|
||||
|
||||
```go-html-template
|
||||
{{ .Language.LanguageCode }} → de-DE
|
||||
|
@ -35,7 +35,7 @@ Lang
|
||||
```
|
||||
|
||||
LanguageCode
|
||||
: (`string`) The language code from the site configuration.
|
||||
: (`string`) The language code from the site configuration. Falls back to `Lang` if not defined.
|
||||
|
||||
```go-html-template
|
||||
{{ .Site.Language.LanguageCode }} → de-DE
|
||||
|
Loading…
x
Reference in New Issue
Block a user