Skip to content

Commit

Permalink
Fixed the bug that the translation json file cannot be loaded in the …
Browse files Browse the repository at this point in the history
…window system
  • Loading branch information
gouguoyin committed Oct 29, 2022
1 parent 00cabee commit 52b794f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions language.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var fs embed.FS
var (
// default directory
// 默认目录
defaultDir = "lang"
defaultDir = "lang/"

// default locale
// 默认区域
Expand Down Expand Up @@ -53,7 +53,7 @@ func (lang *Language) SetLocale(locale string) {
return
}
lang.locale = locale
fileName := lang.dir + "/" + locale + ".json"
fileName := lang.dir + locale + ".json"
bytes, err := fs.ReadFile(fileName)
if err != nil {
lang.Error = invalidLocaleError(fileName)
Expand Down

0 comments on commit 52b794f

Please sign in to comment.