mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-14 19:34:42 -04:00
Add example for regional language tags (#1139)
* Add example for regional language tags * Typo fix
This commit is contained in:
parent
5e9a60fc02
commit
2a4355113b
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user