{ "id": "76951", "key": "TIMOB-5548", "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": [ { "id": "12081", "description": "", "name": "Sprint 2011-41", "archived": true, "released": true, "releaseDate": "2011-10-17" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-06-29T01:23:09.000+0000", "created": "2011-06-28T02:39:33.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "akulinich", "key": "akulinich", "displayName": "Andrew Kulinich", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-03T23:34:11.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.currentLocale returns 'en' value by default. It have to return value in such format 'ru-RU', 'en-US', etc([Ti.Locale documentation|http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.Locale-module]). This property should be readonly.\r\nAdditional details: \r\n1. Ti.Locale.currentLocale specified only for Android. Value of Ti.Locale.currentLocale defined by Custom Locale properties in Android OS. Property is readonly.\r\n2. Ti.Locale.currentLocale not specified for iOS. It returns 'undefined' and can be programmatically changed. \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 = ta.value + 'Current Locale: ' + Ti.Locale.currentLocale + '\\r\\n';\r\n});\r\n{code}", "attachment": [], "flagged": false, "summary": "MobileWeb: Ti.Locale.currentLocale returns incorrect value. 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": "157991", "author": { "name": "akulinich", "key": "akulinich", "displayName": "Andrew Kulinich", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Property left writable - because this is not device and it can be usable to change locale in app because we can't know user's locale.\nnow using Ti.Locale.currentLanguage to change app language", "updateAuthor": { "name": "akulinich", "key": "akulinich", "displayName": "Andrew Kulinich", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-06-29T01:23:10.000+0000", "updated": "2011-06-29T01:23:10.000+0000" }, { "id": "409107", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as MobileWeb is no longer supported.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-03T23:34:11.000+0000", "updated": "2017-03-03T23:34:11.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }