[AC-5313] Ti.Locale.setLanguage("en") does not select iso country code regions eg en-US, en-GB - Defaults to en.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Needs more info |
Resolution Date | 2017-11-19T20:53:21.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | n/a |
Reporter | Michael Buxton |
Assignee | Shak Hossain |
Created | 2017-10-27T10:08:24.000+0000 |
Updated | 2017-11-19T20:53:21.000+0000 |
Description
We have a multi-lingual app. Supporting EN, EN-gb, EN-us, DE, FR, PT, JA and ES
(English, British English, American English, German, French, Portuguese and Spanish)
Our i18n files are the following: de, en, en-gb, en-US, es, fr, ja, pt. .XML files.
Letting the app automatically select the language if the user is in the UK or US correctly sets en-gb or en-US.
Giving the user the chance to manually change their language using Ti.Locale.setLanguage("en") on iOS only accepts an ISO 639-1 country code, eg "en". We've then found it chooses the first file it finds in the i18n folder that matches it - "en". So when manually setting right now it does not allow country specific languages, eg American English.
You would assume it would pick up the country code that a user is in after the language is selected, eg en-US, en-GB.
Deleting the country "en" .xml file from the i18n folder, to test if this will fix it does not work as then en's root is missing and sets the language to the next iso language alphabetically in the list (Which is DE - German).
Hello, Can you provide a sample app which demonstrates the behavior? Thanks.
Hello [~mbuxton], Just passing a followup here.Are you able to get that sorted out? Please let us know if you need more help with this issue. Regards Axway Appcelerator Support