Add example for regional language tags (#1139)

* Add example for regional language tags

* Typo fix
This commit is contained in:
Sérgio 2020-11-02 11:10:24 +02:00 committed by GitHub
parent 5e9a60fc02
commit 2a4355113b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,6 +52,10 @@ help = "Aide"
title = "مدونتي"
weight = 2
languagedirection = "rtl"
[languages.pt-pt]
title = "O meu blog"
weight = 3
{{< /code-toggle >}}
Anything not defined in a `languages` block will fall back to the global value for that key (e.g., `copyright` for the English `en` language). This also works for `params`, as demonstrated with `help` above: You will get the value `Aide` in French and `Help` in all the languages without this parameter set.
@ -67,6 +71,8 @@ If the default language needs to be rendered below its own language code (`/en`)
Only the obvious non-global options can be overridden per language. Examples of global options are `baseURL`, `buildDrafts`, etc.
**Please note:** use lowercase language codes, even when using regional languages (ie. use pt-pt instead of pt-PT). Currently Hugo language internals lowercase language codes, which can cause conflicts with settings like `DefaultContentLanguage` which are not lowercased. Please track the evolution of this issue in [Hugo repository issue tracker](https://github.com/gohugoio/hugo/issues/7344)
### Disable a Language
You can disable one or more languages. This can be useful when working on a new translation.