Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Won't Fix
-
3.5.0
-
None
-
ios
Description
When using "getPreferredLanguage" the language value returned is a combination of the user language and also the users current region.
Affected versions :
org.apache.cordova.globalization 0.3.4 "Globalization"
org.apache.cordova.globalization 1.0.0 "Globalization"
This is a problem when the user sets their language to say, French and has their location set up as United states. The result is a language code of fr-US, however if you set the language to Chinese, Hong-Kong you get the full language code zh-hk
Its the inconsistency which I find a problem, knowing if the language code is a full language code "zh-hk" vs a language code region "fr-US"
May be the return objects could be expended to include a little more details. for example.
return {
env : "ios",
code : 'fr',
region : 'US'
}
return {
env : "ios",
code : 'zh-hk',
region : 'US'
}