diff options
author | Tan Yuanhong <[email protected]> | 2020-03-10 17:10:58 +0800 |
---|---|---|
committer | GitHub <[email protected]> | 2020-03-10 10:10:58 +0100 |
commit | 5914f91b6c980e42693661d5fd5640e237691df6 (patch) | |
tree | bce51813806dc2c96ce41b9df75fad973fe7ee62 /langs | |
parent | 5b4659fa0bd28511b8aded64e824e73baaabb0b5 (diff) | |
download | hugo-5914f91b6c980e42693661d5fd5640e237691df6.tar.gz hugo-5914f91b6c980e42693661d5fd5640e237691df6.zip |
Add languageDirection to language configuration
Fixes #6550
Diffstat (limited to 'langs')
-rw-r--r-- | langs/config.go | 2 | ||||
-rw-r--r-- | langs/language.go | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/langs/config.go b/langs/config.go index 184223650..08cd15009 100644 --- a/langs/config.go +++ b/langs/config.go @@ -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": diff --git a/langs/language.go b/langs/language.go index 036f5413a..874bd3020 100644 --- a/langs/language.go +++ b/langs/language.go @@ -41,10 +41,11 @@ var globalOnlySettings = map[string]bool{ // Language manages specific-language configuration. type Language struct { - Lang string - LanguageName string - Title string - Weight int + Lang string + LanguageName string + LanguageDirection string + Title string + Weight int Disabled bool |