[jira] [Commented] (CB-14236) navigator.languages only returns a single language on iOS

2018-08-01 Thread Daniel Wolf (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-14236?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16564868#comment-16564868
 ] 

Daniel Wolf commented on CB-14236:
--

Thanks for your explanation. It all makes sense to me now.

> navigator.languages only returns a single language on iOS 
> --
>
> Key: CB-14236
> URL: https://issues.apache.org/jira/browse/CB-14236
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-ios
>Affects Versions: cordova@7.0.0, cordova-ios 4.5.0
>Reporter: Daniel Wolf
>Priority: Major
>
> Most operating systems allow the user to specify not only a single OS locale, 
> but a list of prefered locales. On both Android and Windows UWP, 
> `navigator.languages` returns the full list of prefered languages. On iOS, 
> however, only the first language of the list is returned.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-14236) navigator.languages only returns a single language on iOS

2018-07-31 Thread Daniel Wolf (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-14236?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16563731#comment-16563731
 ] 

Daniel Wolf commented on CB-14236:
--

There's probably some misconception on my side.

I understand that on Android, Cordova uses Chrome as its webview. That is, the 
same code that functions as a standalone browser (Chrome) is also used as an 
embedded browser within Cordova.

When I run Chrome as a standalone app, JavaScript code within that app that 
accesses `navigator.languages` gets the list of preferred languages the user 
configured in the Chrome settings, not the list the user configured in the 
Android settings.

When I run Cordova on Android, it is my understanding that this JavaScript code 
is also executed within Chrome. But this time, code that accesses 
`navigator.languages` gets the list of preferred languages the user configured 
in the Android settings, not the list the user configured in the Chrome 
settings.

So my question is: If the standalone Chrome browser and the embedded webview 
share the same code, how does that code know which languages to use?

> navigator.languages only returns a single language on iOS 
> --
>
> Key: CB-14236
> URL: https://issues.apache.org/jira/browse/CB-14236
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-ios
>Affects Versions: cordova@7.0.0, cordova-ios 4.5.0
>Reporter: Daniel Wolf
>Priority: Major
>
> Most operating systems allow the user to specify not only a single OS locale, 
> but a list of prefered locales. On both Android and Windows UWP, 
> `navigator.languages` returns the full list of prefered languages. On iOS, 
> however, only the first language of the list is returned.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-14236) navigator.languages only returns a single language on iOS

2018-07-31 Thread Daniel Wolf (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-14236?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16563670#comment-16563670
 ] 

Daniel Wolf commented on CB-14236:
--

Thanks for the information, [~jcesarmobile]. There's one thing I don't 
understand, though: Most browsers (inclusing Chrome) have their own language 
options, where the user can set preferred languages independently from the OS 
settings. Normally, reading `navigator.languages` on these browsers returns the 
browser settings, _not_ the OS settings. But when used as a webview within 
Cordova, Chrome returns the OS settings instead of the browser settings.

So how do these browsers know whether to return the browser settings or the OS 
settings? Does Cordova tell them?

> navigator.languages only returns a single language on iOS 
> --
>
> Key: CB-14236
> URL: https://issues.apache.org/jira/browse/CB-14236
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-ios
>Affects Versions: cordova@7.0.0, cordova-ios 4.5.0
>Reporter: Daniel Wolf
>Priority: Major
>
> Most operating systems allow the user to specify not only a single OS locale, 
> but a list of prefered locales. On both Android and Windows UWP, 
> `navigator.languages` returns the full list of prefered languages. On iOS, 
> however, only the first language of the list is returned.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Created] (CB-14236) navigator.languages only returns a single language on iOS

2018-07-31 Thread Daniel Wolf (JIRA)
Daniel Wolf created CB-14236:


 Summary: navigator.languages only returns a single language on iOS 
 Key: CB-14236
 URL: https://issues.apache.org/jira/browse/CB-14236
 Project: Apache Cordova
  Issue Type: Bug
  Components: cordova-ios
Affects Versions: cordova-ios 4.5.0, cordova@7.0.0
Reporter: Daniel Wolf


Most operating systems allow the user to specify not only a single OS locale, 
but a list of prefered locales. On both Android and Windows UWP, 
`navigator.languages` returns the full list of prefered languages. On iOS, 
however, only the first language of the list is returned.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org