mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -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"
|
||||
[languages.fr.params.navigation]
|
||||
help = "Aide"
|
||||
|
||||
[languages.ar]
|
||||
title = "مدونتي"
|
||||
weight = 2
|
||||
languagedirection = "rtl"
|
||||
{{< /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.
|
||||
|
|
|
@ -185,6 +185,8 @@ func toSortedLanguages(cfg config.Provider, l map[string]interface{}) (Languages
|
|||
language.Title = cast.ToString(v)
|
||||
case "languagename":
|
||||
language.LanguageName = cast.ToString(v)
|
||||
case "languagedirection":
|
||||
language.LanguageDirection = cast.ToString(v)
|
||||
case "weight":
|
||||
language.Weight = cast.ToInt(v)
|
||||
case "contentdir":
|
||||
|
|
|
@ -43,6 +43,7 @@ var globalOnlySettings = map[string]bool{
|
|||
type Language struct {
|
||||
Lang string
|
||||
LanguageName string
|
||||
LanguageDirection string
|
||||
Title string
|
||||
Weight int
|
||||
|
||||
|
|
Loading…
Reference in a new issue