Skip to content

Commit 717e8ad

Browse files
authored
Update geoip_util.cpp
1 parent bc6d9bd commit 717e8ad

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

extensions/geoip/geoip_util.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,13 +183,13 @@ const char *getLang(int target)
183183

184184
if (translator->GetLanguageInfo(langid, &code, NULL))
185185
{
186+
if (strcmp(code, "chi") == 0 || strcmp(code, "zho") == 0) {
187+
return "zh-CN";
188+
}
186189
for (size_t i = 0; i < mmdb.metadata.languages.count; i++)
187190
{
188191
if (strcmp(code, mmdb.metadata.languages.names[i]) == 0)
189192
{
190-
if (strcmp(code, "chi") == 0 || strcmp(code, "zho") == 0) {
191-
return "zh-CN";
192-
}
193193
return code;
194194
}
195195
}

0 commit comments

Comments
 (0)