{ "id": "86888", "key": "TIMOB-7826", "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": null, "resolutiondate": null, "created": "2012-02-23T11:40:48.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [ { "id": "12677", "description": "Release 1.8 Service Pack 1", "name": "Release 1.8.1", "archived": true, "released": true, "releaseDate": "2012-01-31" } ], "issuelinks": [], "assignee": null, "updated": "2018-03-06T18:57:59.000+0000", "status": { "description": "This issue was once resolved, but the resolution was deemed incorrect. From here issues are either marked assigned or resolved.", "name": "Reopened", "id": "4", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h4. Problem description\r\nCurrently, the i18n support allows the customer to change the language of the app when running, except for the mail dialogs, that stick to the default settings of CFBundleDevelopmentRegion in Info.plist. \r\n\r\nh4. Actual results\r\nEven if you changed the phone's language to a new one, you will be seeing the default language from CFBundleDevelopmentRegion.\r\n\r\nh4. Expected Results.\r\nWhen you change the language in the phone's settings, it should reflect in the mail dialog. \r\n\r\nh4. Steps to reproduce\r\n1. Create a mobile App\r\n2. Add the code\r\n3. Change the phone's language in the main settings\r\n4. Start the app and start the dialogue\r\n4. You won't see the i18n change in the mail dialogue language.\r\n\r\n\r\n{code}\r\n\r\nvar win = Ti.UI.createWindow();\r\n\r\n// initialize to all modes\r\nwin.orientationModes = [\r\n\tTitanium.UI.PORTRAIT,\r\n\tTitanium.UI.LANDSCAPE_LEFT,\r\n\tTitanium.UI.LANDSCAPE_RIGHT\r\n];\r\n\r\n\r\nTitanium.Media.openPhotoGallery({\r\n\tallowEditing:true,\r\n\r\n\tsuccess: function(event)\r\n\t{\r\n\t\tvar emailDialog = Titanium.UI.createEmailDialog();\r\n\t\tif (!emailDialog.isSupported()) {\r\n\t\tTi.UI.createAlertDialog({\r\n\t\t\ttitle:'Error',\r\n\t\t\tmessage:'Email not available'\r\n\t\t}).show();\r\n\t\treturn;\r\n\t\t}\r\n\t\temailDialog.setSubject('Hello from Titanium!');\r\n\t\temailDialog.setToRecipients(['foo@yahoo.com']);\r\n\t\temailDialog.setCcRecipients(['bar@yahoo.com']);\r\n\t\temailDialog.setBccRecipients(['blah@yahoo.com']);\r\n\t\t\r\n\t\tif (Ti.Platform.name == 'iPhone OS') {\r\n\t\t\temailDialog.setMessageBody('Appcelerator Titanium Rocks!å');\r\n\t\t\temailDialog.setHtml(true);\r\n\t\t\temailDialog.setBarColor('#336699');\r\n\t\t} else {\r\n\t\t\temailDialog.setMessageBody('Appcelerator Titanium Rocks!');\r\n\t\t}\r\n\r\n\t\t// attach a blob\r\n\t\temailDialog.addAttachment(event.media);\r\n\t\t\r\n\t\t// attach a file\r\n\t\tvar f = Ti.Filesystem.getFile(Titanium.Filesystem.resourcesDirectory, 'cricket.wav');\r\n\t\temailDialog.addAttachment(f);\r\n\t\t\r\n\t\temailDialog.addEventListener('complete',function(e)\r\n\t\t{\r\n\t\t\tif (e.result == emailDialog.SENT)\r\n\t\t\t{\r\n\t\t\t\tif (Ti.Platform.osname != 'android') {\r\n\t\t\t\t\t// android doesn't give us useful result codes.\r\n\t\t\t\t\t// it anyway shows a toast.\r\n\t\t\t\t\talert(\"message was sent\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\talert(\"message was not sent. result = \" + e.result);\r\n\t\t\t}\r\n\t\t});\r\n\t\temailDialog.open();\r\n\t},\r\n\r\n\terror: function(error)\r\n\t{\r\n\r\n\t},\r\n\r\n\tcancel: function()\r\n\t{\r\n\r\n\t}\r\n});\r\n\r\nwin.open();\r\n{code}", "attachment": [ { "id": "56740", "filename": "iOS Simulator Screen Shot 17 sep. 2015 10.41.03.png", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-09-17T09:42:33.000+0000", "size": 291627, "mimeType": "image/png" } ], "flagged": false, "summary": "iOS: Change the mail's dialogue language dynamically", "creator": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "iotashan", "key": "iotashan", "displayName": "Shannon Hicks", "active": true, "timeZone": "America/Chicago" }, "environment": "Titanium SDK version: 1.8.1 \r\nPlatform & version: iOS 5.0\r\nDevice Details: iOS simulator\r\nHost Operating System: OSX Lion \r\nTitanium Studio version: 1.0.8", "comment": { "comments": [ { "id": "184401", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Short version: Apple didn't see the use case of changing a language mid-app.\r\n\r\nLonger version: Their intended use case was to have the user change it deep within settings, and within an app, this locale is read-only. Apple provides no localization controls over MFMailComposeViewController, the native class we wrapper.\r\n\r\nSuggestion: What we should document is Apple's behavior with localization. We've seen this also within a web view, video player, etc, anyplace where Apple provides text buttons for us. For consistency's sake, Apple will use the system's device localization *only* when the application has been localized for it. Otherwise it will, indeed, fall back to CFBundleDevelopmentRegion.\r\n\r\nSo in this case, I would suggest using the traditional l18n techniques to localize the App display name, so that it would show up with a localized name in Springboard (home) as well as signalling to iOS to localize the mail dialog to the device localization.\r\n\r\nIt won't be dynamic on-the-fly localization using your techniques, but it will be better than always reverting to DevelopmentRegion.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-02-27T14:01:49.000+0000", "updated": "2012-02-27T14:01:49.000+0000" }, { "id": "184721", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello,\r\n\r\nfor the customer: here is the info about how to localize the app name: http://developer.appcelerator.com/blog/2012/02/internationalization-of-app-names.html\r\n\r\nThe only localization here would be the app name, changing here the mail lang as well, in sync with the phone's locale. \r\n\r\nBest,\r\n\r\nMauro", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2012-02-29T16:01:18.000+0000", "updated": "2012-02-29T16:01:18.000+0000" }, { "id": "185279", "author": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Due to the confluence of Apple's design and what appears to be a fix on the customer's side, resolving ticket. Closest resolution match is 'invalid' since there is no code nor documentation changes to be made.", "updateAuthor": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-06T16:08:13.000+0000", "updated": "2012-03-06T16:08:13.000+0000" }, { "id": "364175", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "[~ingo] I'd like to reopen this. The problem is not just changing the language while the app is open.\r\n\r\nSee:\r\nhttp://fokkezb.nl/2013/05/24/app-store-locality/\r\n\r\nAnd attached image showing the same for permission dialogs.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-09-17T09:42:37.000+0000", "updated": "2015-09-17T09:43:31.000+0000" }, { "id": "364185", "author": { "name": "ray@raymondverbruggen.nl", "key": "ray@raymondverbruggen.nl", "displayName": "Raymond Verbruggen", "active": true, "timeZone": "Europe/Berlin" }, "body": "Fokke, thank you for reopening this ticket.\r\nThe screenshot you provide is exactly what happens.\r\nWhen opening a Ti.map instance, iOS asks for user permission to use the actual location.\r\nThe \"internationalized\" strings are shown in the dialog below some english default message or so.\r\n\r\nCould somebody please provide a fix?\r\nThis is an update of a production app.\r\n\r\nThanks a lot!\r\nRaymond", "updateAuthor": { "name": "ray@raymondverbruggen.nl", "key": "ray@raymondverbruggen.nl", "displayName": "Raymond Verbruggen", "active": true, "timeZone": "Europe/Berlin" }, "created": "2015-09-17T10:43:56.000+0000", "updated": "2015-09-17T10:44:59.000+0000" }, { "id": "364501", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "[~ray@raymondverbruggen.nl] can you confirm what the system language of the iPhone you tested on is? Could you attach a screenshot of the language & regional settings screen?", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2015-09-21T17:28:52.000+0000", "updated": "2015-09-21T17:28:52.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }