Translate: adopt html lang attribute if valid value is provided
Language decision is made by heuristics using Content-Language and CLD determined language. This change adds html lang attribute, e.g., <html lang="ja">, as a third hint for language decision. Content-Language is often invalid due to invalid server configuration. On the other hand, lang attribute is provided by pages, or authoring tools or authors themselves. As a result, they are more reliable than Content-Language. With this change, language decision uses html lang attribute instead of Content-Language if valid value is provided. Other dicision process is not changed at all. BUG=222073 TEST=unit_tests, browser_tests Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=201856 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=202427 Review URL: https://chromiumcodereview.appspot.com/15728002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202531 0039d316-1c4b-4281-b951-d872f2087c98
Showing
Please register or sign in to comment