Skip to content

Commit 413f528

Browse files
committed
feat: Add pt-BR support for i18n
1 parent f320492 commit 413f528

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

backend/i18n/i18n.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,15 @@ func Init() {
9999
_, _ = bundle.LoadMessageFileFS(fs, "lang/en.yaml")
100100
_, _ = bundle.LoadMessageFileFS(fs, "lang/zh-Hant.yaml")
101101
_, _ = bundle.LoadMessageFileFS(fs, "lang/fa.yaml")
102+
_, _ = bundle.LoadMessageFileFS(fs, "lang/pt.yaml")
102103
}
103104

104105
func UseI18nForCmd(lang string) {
105106
if lang == "" {
106-
lang = "zh"
107+
lang = "en"
108+
}
109+
if lang == "pt-BR" {
110+
lang = "pt"
107111
}
108112
if bundle == nil {
109113
Init()

0 commit comments

Comments
 (0)