mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-12 20:13:59 +02:00
tpl/lang: Add new localized versions of lang.FormatNumber etc.
Fixes #8820
This commit is contained in:
@@ -97,11 +97,11 @@ func NewLanguage(lang string, cfg config.Provider) *Language {
|
||||
|
||||
localCfg := config.New()
|
||||
compositeConfig := config.NewCompositeConfig(cfg, localCfg)
|
||||
translator := translators.Get(lang)
|
||||
translator := translators.GetTranslator(lang)
|
||||
if translator == nil {
|
||||
translator = translators.Get(cfg.GetString("defaultContentLanguage"))
|
||||
translator = translators.GetTranslator(cfg.GetString("defaultContentLanguage"))
|
||||
if translator == nil {
|
||||
translator = translators.Get("en")
|
||||
translator = translators.GetTranslator("en")
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user