mirror of
https://github.com/acepanel/panel.git
synced 2026-02-05 05:47:17 +08:00
17 lines
340 B
Go
17 lines
340 B
Go
package bootstrap
|
|
|
|
import (
|
|
"github.com/knadh/koanf/v2"
|
|
"github.com/leonelquinteros/gotext"
|
|
|
|
"github.com/tnb-labs/panel/pkg/embed"
|
|
)
|
|
|
|
func NewT(conf *koanf.Koanf) (*gotext.Locale, error) {
|
|
locale := conf.String("app.locale")
|
|
l := gotext.NewLocaleFSWithPath(locale, embed.LocalesFS, "locales")
|
|
l.AddDomain("backend")
|
|
|
|
return l, nil
|
|
}
|