Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5772)

Unified Diff: chrome/renderer/render_view.cc

Issue 561065: Use LanguageCodeWithDialects instead of LanguageCode to get 'zh-CN' ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_view.cc
===================================================================
--- chrome/renderer/render_view.cc (revision 38030)
+++ chrome/renderer/render_view.cc (working copy)
@@ -3170,9 +3170,11 @@
cld_language != TG_UNKNOWN_LANGUAGE) {
// We should not use LanguageCode_ISO_639_1 because it does not cover all
// the languages CLD can detect. As a result, it'll return the invalid
- // language code for tradtional Chinese among others. |LanguageCode| will go
- // through ISO 639-1, ISO-639-2 and 'other' tables to do the 'right' thing.
- language = LanguageCode(cld_language);
+ // language code for tradtional Chinese among others.
+ // |LanguageCodeWithDialect| will go through ISO 639-1, ISO-639-2 and
+ // 'other' tables to do the 'right' thing. In addition, it'll return zh-CN
+ // for Simplified Chinese.
+ language = LanguageCodeWithDialects(cld_language);
}
return language;
}
@@ -4277,4 +4279,3 @@
Send(new ViewHostMsg_GPUPluginBuffersSwapped(routing_id(), window));
}
#endif
-
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698