Skip to content

Commit

Permalink
调整语言判断
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoker1 committed Dec 28, 2023
1 parent 378c32d commit 176e40c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,9 @@ class VersionInfoRepository {
private fun getLanguageHeaderValue(): String {
//"ZH" means Chinese
val currentLocale = Locale.getDefault()
return if ("zh".equals(currentLocale.language, true) && "hans".equals(currentLocale.script, true)) {
val country: String = currentLocale.country.toLowerCase(Locale.ROOT)
LogUtils.i(LOG_TAG,currentLocale.language,currentLocale.script)
return if ("zh".equals(currentLocale.language, true) && "cn".equals(country)) {
"cn"
} else {
"en"
Expand Down

0 comments on commit 176e40c

Please sign in to comment.