[TIMOB-8583] BlackBerry: Implement important Titanium.Locale functionality
| GitHub Issue | n/a |
|---|---|
| Type | Story |
| Priority | Medium |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2013-03-19T17:49:06.000+0000 |
| Affected Version/s | Backlog |
| Fix Version/s | Release 3.1.0, 2013 Sprint 06 BB, 2013 Sprint 06 |
| Components | BlackBerry |
| Labels | notable |
| Reporter | Francois Boisvert |
| Assignee | Pedro Enrique |
| Created | 2012-04-06T06:37:02.000+0000 |
| Updated | 2017-03-08T18:52:07.000+0000 |
Pull request:
https://github.com/appcelerator/titanium_mobile_blackberry/pull/26 Note: The build scripts still need to be modified. If the i18n folder exists, it needs to be copied from the root of the Titanium project to the assets folder in the native generated project.Ignore my last comment about coping the i18n folder. Already done and tested. Same PR. https://github.com/pec1985/titanium_mobile_blackberry/commit/92507406c177c018e07673b1b7a950820ac53e13
Attaching test case:
Ti.API.info('------------ Ti.Locale.getString() ---------------'); Ti.API.info('Should be "Welcome to BB10 Test app" is: ' + Ti.Locale.getString('welcome_message')); Ti.API.info('Should be "No Found" is: ' + Ti.Locale.getString('welcome_message2', 'Not Found')); Ti.API.info('Should be "welcome_message2" is: ' + Ti.Locale.getString('welcome_message2')); Ti.API.info(''); Ti.API.info('--------------------- L() ------------------------'); Ti.API.info('Should be "Welcome to BB10 Test app" is: ' + L('welcome_message')); Ti.API.info('Should be "No Found" is: ' + L('welcome_message2', 'Not Found')); Ti.API.info('Should be "welcome_message2" is: ' + L('welcome_message2')); Ti.API.info(''); Ti.API.info('-------------- Locale Properties -----------------'); Ti.API.info("Ti.Locale.currentLanguage should be en, was = " + Ti.Locale.currentLanguage); Ti.API.info("Ti.Locale.currentCountry should be US, was = " + Ti.Locale.currentCountry); Ti.API.info("Ti.Locale.currentLocale should be en_US, was = " + Ti.Locale.currentLocale); Ti.API.info(''); Ti.API.info('--------------- Locale Methods ------------------'); Ti.API.info("Ti.Locale.getCurrentLanguage should be en, was = " + Ti.Locale.getCurrentLanguage()); Ti.API.info("Ti.Locale.getCurrentCountry should be US, was = " + Ti.Locale.getCurrentCountry()); Ti.API.info("Ti.Locale.getCurrentLocale should be en_US, was = " + Ti.Locale.getCurrentLocale()); Ti.API.info('');Closing ticket as resolved.