diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2016-07-25 22:22:09 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2016-09-06 18:32:15 +0300 |
commit | c4e7c37055a029a26d87ebeb21614efb3f0b0040 (patch) | |
tree | 55c05751d0734ace44783bc0b196873fd889d590 /commands/multilingual.go | |
parent | 06d12ab895a83fc8a9f94b23e533b25511bbb6d1 (diff) |
Add Translations and AllTranslations methods to Page
Will revisit Node later.
Diffstat (limited to 'commands/multilingual.go')
-rw-r--r-- | commands/multilingual.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/commands/multilingual.go b/commands/multilingual.go index 983dc756d..3f813474d 100644 --- a/commands/multilingual.go +++ b/commands/multilingual.go @@ -33,6 +33,7 @@ func readMultilingualConfiguration() error { func toSortedLanguages(l map[string]interface{}) (hugolib.Languages, error) { langs := make(hugolib.Languages, len(l)) + i := 0 for lang, langConf := range l { langsMap, ok := langConf.(map[string]interface{}) @@ -57,7 +58,8 @@ func toSortedLanguages(l map[string]interface{}) (hugolib.Languages, error) { language.SetParam(loki, v) } - langs = append(langs, language) + langs[i] = language + i++ } sort.Sort(langs) |