Use i18n.Reset to reload locales (#15073)
This commit is contained in:
parent
17731e05ff
commit
24f7bd5899
5 changed files with 11 additions and 12 deletions
5
vendor/github.com/unknwon/i18n/i18n.go
generated
vendored
5
vendor/github.com/unknwon/i18n/i18n.go
generated
vendored
|
@ -174,6 +174,11 @@ func SetMessageWithDesc(lang, langDesc string, localeFile interface{}, otherLoca
|
|||
return err
|
||||
}
|
||||
|
||||
// Reset resets locale store.
|
||||
func Reset() {
|
||||
locales = &localeStore{store: make(map[string]*locale)}
|
||||
}
|
||||
|
||||
// SetMessage sets the message file for localization.
|
||||
func SetMessage(lang string, localeFile interface{}, otherLocaleFiles ...interface{}) error {
|
||||
return SetMessageWithDesc(lang, lang, localeFile, otherLocaleFiles...)
|
||||
|
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
|
@ -772,7 +772,7 @@ github.com/ulikunitz/xz/lzma
|
|||
# github.com/unknwon/com v1.0.1
|
||||
## explicit
|
||||
github.com/unknwon/com
|
||||
# github.com/unknwon/i18n v0.0.0-20200823051745-09abd91c7f2c
|
||||
# github.com/unknwon/i18n v0.0.0-20210321134014-0ebbf2df1c44
|
||||
## explicit
|
||||
github.com/unknwon/i18n
|
||||
# github.com/unknwon/paginater v0.0.0-20200328080006-042474bd0eae
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue