diff --git a/backend/i18n/i18n.go b/backend/i18n/i18n.go index cad6f7d92..c102e2fcd 100644 --- a/backend/i18n/i18n.go +++ b/backend/i18n/i18n.go @@ -99,11 +99,15 @@ func Init() { _, _ = bundle.LoadMessageFileFS(fs, "lang/en.yaml") _, _ = bundle.LoadMessageFileFS(fs, "lang/zh-Hant.yaml") _, _ = bundle.LoadMessageFileFS(fs, "lang/fa.yaml") + _, _ = bundle.LoadMessageFileFS(fs, "lang/pt.yaml") } func UseI18nForCmd(lang string) { if lang == "" { - lang = "zh" + lang = "en" + } + if lang == "pt-BR" { + lang = "pt" } if bundle == nil { Init() diff --git a/cmd/server/cmd/root.go b/cmd/server/cmd/root.go index 4fe640874..34be4020c 100644 --- a/cmd/server/cmd/root.go +++ b/cmd/server/cmd/root.go @@ -16,7 +16,7 @@ import ( var language string func init() { - RootCmd.PersistentFlags().StringVarP(&language, "language", "l", "zh", "Set the language (default is 'zh')") + RootCmd.PersistentFlags().StringVarP(&language, "language", "l", "en", "Set the language") } var RootCmd = &cobra.Command{