{ "id": "108697", "key": "TIMOB-12467", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2017-06-22T20:23:40.000+0000", "created": "2013-01-29T02:05:13.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "supportTeam" ], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" }, { "id": "15856", "description": "Release 3.2.1", "name": "Release 3.2.1", "archived": false, "released": true, "releaseDate": "2014-02-10" } ], "issuelinks": [], "assignee": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-06-22T20:23:40.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "Ti.Locale.currentLanguage is not returning 2 letter code - ISO 639-1 as per our documentation http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Locale-property-currentLanguage \r\nand apple's documentation \r\nhttps://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPInternational/Articles/LanguageDesignations.html \r\nIt is returning \"zh-Hans\" when you set the language of your device to chinese. \r\nh4. Actual Result\r\nIt is returning \"zh.Hans\"\r\nh4. Expected Result\r\nIt should return \"zh\"\r\nh3.Repo Steps\r\n1. Include the below testcase in your project's app.js\r\n2. Set the language of your device to Chinese.\r\n3. Open the app and click the show button.\r\n4. It'll show \"zh-Hans\" in the text area.\r\n\r\n{code}\r\nvar win = Titanium.UI.createWindow();\r\nwin.backgroundColor = '#EEE';\r\n\r\nvar show = Ti.UI.createButton({\r\n\ttitle : 'Show',\r\n\tleft : 90,\r\n\ttop : 10,\r\n\twidth : 140,\r\n\theight : 45,\r\n\tfontSize : 20\r\n});\r\n\r\nvar ta = Ti.UI.createTextArea({\r\n\ttop : 110,\r\n\tleft : 10,\r\n\twidth : 300,\r\n\theight : 180,\r\n\tbackgroundColor : 'white',\r\n\tfontSize : 18\r\n});\r\n\r\nwin.add(show);\r\nwin.add(ta);\r\n\r\nshow.addEventListener('click', function() {\r\n\tta.value = \"Show current language:\" + Ti.Locale.getCurrentLanguage();\r\n});\r\nwin.open();\r\n\r\n{code}\r\n", "attachment": [ { "id": "46138", "filename": "iOS Simulator Screen shot Feb 23, 2014 11.24.27 AM.png", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2014-02-23T05:35:35.000+0000", "size": 27426, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: Locale.currentLanguage not returning 2 letter code- ISO 639-1 for chinese language", "creator": { "name": "nsharma", "key": "nsharma", "displayName": "Nikhil Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "nsharma", "key": "nsharma", "displayName": "Nikhil Sharma", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "TiSDK 3.0.0.GA\r\niOS 6", "comment": { "comments": [ { "id": "422573", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "I am unable to reproduce this issue with the following environment;\r\niPhone 7 (10.2)\r\nStudio 4.9.0.201705302345\r\nTi SDK 6.1.1.v20170620103414\r\nAppc NPM 4.2.9\r\nAppc CLI 6.2.1\r\nTi CLI 5.0.13\r\nAlloy 1.9.11\r\nArrow 2.0.0\r\nXcode 8.2 (8C38)\r\nNode v4.8.2\r\nJava 1.8.0_131", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-06-22T20:23:40.000+0000", "updated": "2017-06-22T20:23:40.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }