updated

This commit is contained in:
landaiqing
2024-11-14 01:58:20 +08:00
parent c95d5fc041
commit 3b8e3df27a
83 changed files with 172212 additions and 343 deletions

View File

@@ -1,16 +0,0 @@
package i18n
import (
i18n2 "github.com/nicksnyder/go-i18n/v2/i18n"
"github.com/pelletier/go-toml/v2"
"golang.org/x/text/language"
)
func NewBundle(tag language.Tag, configs ...string) *i18n2.Bundle {
bundle := i18n2.NewBundle(tag)
bundle.RegisterUnmarshalFunc("toml", toml.Unmarshal)
for _, file := range configs {
bundle.LoadMessageFile(file)
}
return bundle
}