Skip to content

Commit bc6d9bd

Browse files
authored
fix geoip chi and zho not return chinese translation
Fixed the problem that the Chinese translation could not be obtained correctly
1 parent 20642a8 commit bc6d9bd

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

extensions/geoip/geoip_util.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,9 @@ const char *getLang(int target)
187187
{
188188
if (strcmp(code, mmdb.metadata.languages.names[i]) == 0)
189189
{
190+
if (strcmp(code, "chi") == 0 || strcmp(code, "zho") == 0) {
191+
return "zh-CN";
192+
}
190193
return code;
191194
}
192195
}
@@ -206,4 +209,4 @@ std::string lookupString(const char *ip, const char **path)
206209
}
207210

208211
return std::string(result.utf8_string, result.data_size);
209-
}
212+
}

0 commit comments

Comments
 (0)