2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 10:17:17 +08:00
Files
panel/internal/bootstrap/t.go
2025-04-12 20:33:14 +08:00

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
}