Fix null value in backend Translate()

This commit is contained in:
Yang Luo
2023-06-07 02:10:35 +08:00
parent f934531083
commit f2e3182a69
2 changed files with 3 additions and 3 deletions

View File

@ -108,10 +108,10 @@ func GetLanguage(language string) string {
return "en"
}
if len(language) < 2 {
if len(language) != 2 {
return "en"
} else {
return language[0:2]
return language
}
}