Skip to content

Commit

Permalink
chore: change default language from chinese to english
Browse files Browse the repository at this point in the history
  • Loading branch information
KaySar12 committed Sep 30, 2024
1 parent c5ead82 commit 8a384dc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions backend/i18n/i18n.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package i18n

import (
"embed"
"github.com/1Panel-dev/1Panel/backend/global"
"strings"

"github.com/1Panel-dev/1Panel/backend/global"

"github.com/gin-gonic/gin"
"github.com/nicksnyder/go-i18n/v2/i18n"
"golang.org/x/text/language"
Expand Down Expand Up @@ -82,7 +83,7 @@ func UseI18n() gin.HandlerFunc {
return func(context *gin.Context) {
lang := context.GetHeader("Accept-Language")
if lang == "" {
lang = "zh"
lang = "en"
}
global.I18n = i18n.NewLocalizer(bundle, lang)
}
Expand Down

0 comments on commit 8a384dc

Please sign in to comment.