Add locale support ford deprecated messages

This commit is contained in:
世界 2024-12-14 00:18:58 +08:00
parent 2ac2589d14
commit e6847ff50e
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
4 changed files with 53 additions and 4 deletions

View file

@ -9,6 +9,7 @@ import (
"github.com/sagernet/sing-box/common/humanize"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/experimental/locale"
_ "github.com/sagernet/sing-box/include"
"github.com/sagernet/sing-box/log"
)
@ -54,6 +55,10 @@ func SetupWithUsername(basePath string, workingPath string, tempPath string, use
return nil
}
func SetLocale(localeId string) {
locale.Set(localeId)
}
func Version() string {
return C.Version
}