2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 16:10:59 +08:00
Files
panel/internal/bootstrap/t.go
2025-07-23 04:50:25 +08:00

17 lines
338 B
Go

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