2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 23:27:17 +08:00
Files
panel/internal/bootstrap/t.go
2025-09-18 23:24:03 +08:00

17 lines
340 B
Go

package bootstrap
import (
"github.com/knadh/koanf/v2"
"github.com/leonelquinteros/gotext"
"github.com/acepanel/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
}