mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-28 23:52:04 -05:00
parent
5b4659fa0b
commit
5914f91b6c
3 changed files with 12 additions and 4 deletions
|
@ -47,6 +47,11 @@ weight = 2
|
||||||
linkedin = "https://linkedin.com/fr/whoever"
|
linkedin = "https://linkedin.com/fr/whoever"
|
||||||
[languages.fr.params.navigation]
|
[languages.fr.params.navigation]
|
||||||
help = "Aide"
|
help = "Aide"
|
||||||
|
|
||||||
|
[languages.ar]
|
||||||
|
title = "مدونتي"
|
||||||
|
weight = 2
|
||||||
|
languagedirection = "rtl"
|
||||||
{{< /code-toggle >}}
|
{{< /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.
|
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.
|
||||||
|
|
|
@ -185,6 +185,8 @@ func toSortedLanguages(cfg config.Provider, l map[string]interface{}) (Languages
|
||||||
language.Title = cast.ToString(v)
|
language.Title = cast.ToString(v)
|
||||||
case "languagename":
|
case "languagename":
|
||||||
language.LanguageName = cast.ToString(v)
|
language.LanguageName = cast.ToString(v)
|
||||||
|
case "languagedirection":
|
||||||
|
language.LanguageDirection = cast.ToString(v)
|
||||||
case "weight":
|
case "weight":
|
||||||
language.Weight = cast.ToInt(v)
|
language.Weight = cast.ToInt(v)
|
||||||
case "contentdir":
|
case "contentdir":
|
||||||
|
|
|
@ -41,10 +41,11 @@ var globalOnlySettings = map[string]bool{
|
||||||
|
|
||||||
// Language manages specific-language configuration.
|
// Language manages specific-language configuration.
|
||||||
type Language struct {
|
type Language struct {
|
||||||
Lang string
|
Lang string
|
||||||
LanguageName string
|
LanguageName string
|
||||||
Title string
|
LanguageDirection string
|
||||||
Weight int
|
Title string
|
||||||
|
Weight int
|
||||||
|
|
||||||
Disabled bool
|
Disabled bool
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue