{ "id": "76949", "key": "TIMOB-5614", "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": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2012-01-11T23:13:52.000+0000", "created": "2011-06-28T02:14:17.000+0000", "priority": { "name": "Trivial", "id": "5" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "updated": "2014-01-28T23:44:48.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": "11500", "name": "MobileWeb", "description": "Mobile Web (HTML) Platform" } ], "description": "Ti.Locale.currentLanguage value is 'undefined' by default. It should return current language for the device based on the user's settings. Also, Ti.Locale.currentLanguage have to be readonly property ([Ti.Locale manual|http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.Locale-module]). It can be changed only by changing language in system preferences of the device.\r\nAdditional information: in iOS_SDK and Android_SDK Ti.Locale.currentLanguage property is readonly and returns value defined in system preferences of the device.\r\n{code:JavaScript}\r\nvar win = Titanium.UI.currentWindow;\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 close = Ti.UI.createButton({\r\n\ttitle: 'Close',\r\n\tleft: 90,\r\n\ttop: 60,\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(close);\r\nwin.add(ta);\r\n\r\nclose.addEventListener('click', function(){\r\n\tTitanium.UI.currentWindow.close();\r\n});\r\n\r\nshow.addEventListener('click',function(){\r\n\tta.value = 'Current Language: ' + Ti.Locale.currentLanguage + '\\r\\n';\r\n});\r\n{code} ", "attachment": [], "flagged": false, "summary": "MobileWeb: Ti.Locale.currentLanguage returns undefined. Should be readonly property.", "creator": { "name": "mvasko", "key": "mvasko", "displayName": "Misha Vasko", "active": true, "timeZone": "Europe/Kiev" }, "subtasks": [], "reporter": { "name": "mvasko", "key": "mvasko", "displayName": "Misha Vasko", "active": true, "timeZone": "Europe/Kiev" }, "environment": null, "comment": { "comments": [ { "id": "179016", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "Covered by TIMOB-7121.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2012-01-11T23:13:52.000+0000", "updated": "2012-01-11T23:13:52.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }