Return-Path: X-Original-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8DB0ED27C for ; Mon, 10 Sep 2012 21:42:08 +0000 (UTC) Received: (qmail 11193 invoked by uid 500); 10 Sep 2012 21:42:08 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 11160 invoked by uid 500); 10 Sep 2012 21:42:08 -0000 Mailing-List: contact callback-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-dev@incubator.apache.org Received: (qmail 11148 invoked by uid 99); 10 Sep 2012 21:42:08 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Sep 2012 21:42:08 +0000 Date: Tue, 11 Sep 2012 08:42:08 +1100 (NCT) From: "Simon MacDonald (JIRA)" To: callback-dev@incubator.apache.org Message-ID: <7983418.60202.1347313328233.JavaMail.jiratomcat@arcas> In-Reply-To: <1169276897.55629.1347199687641.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (CB-1405) navigator.language MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-1405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13452477#comment-13452477 ] Simon MacDonald commented on CB-1405: ------------------------------------- I have a fix for this issue but I'm waiting until after the 2.1.0 code freeze before pushing the change. This will be fixed in 2.2.0. > navigator.language > ------------------ > > Key: CB-1405 > URL: https://issues.apache.org/jira/browse/CB-1405 > Project: Apache Cordova > Issue Type: Bug > Components: Android > Affects Versions: 2.0.0 > Environment: Android ICS 4.0.3 > Reporter: Jonathan Bond-Caron > Assignee: Simon MacDonald > Fix For: 2.2.0 > > > When switching language in 'settings / language & input', from en-US -> fr-FR: > console.log(navigator.language); > console.log(navigator.userAgent); > 09-09 09:51:31.923: I/Web Console(11225): Navigator:en-US at file:///android_asset/www/index.html:83 > 09-09 09:51:31.923: I/Web Console(11225): User Agent:Mozilla/5.0 (Linux; U; Android 4.0.3; en-us; Build/ICS.f04ref.20120204) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 at file:///android_asset/www/index.html:84 > The language doesn't appear has having changed in the webView. > This is a known android bug: > http://code.google.com/p/android/issues/detail?id=4641 > But the fix is oddly simple: > appView.getSettings().getUserAgentString(); > super.loadUrl("file:///android_asset/www/index.html"); > See the code here: > https://github.com/android/platform_frameworks_base/blob/master/core/java/android/webkit/WebSettingsClassic.java#L1476 -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira