02-15-2013 05:32 AM
Hi fellows,
I'm trying to find a way to "reset" my App.
Why?
I made an option for the user change the Language. I would like to change the Language, close and open the App again.
I'm currently thinking for the possibility for closing all pages except main, and reload the main page with the nem Language. Any idea here?
02-15-2013 05:39 AM - edited 02-15-2013 05:45 AM
A simple way to update QML strings is to use Retranslate class:
http://developer.blackberry.com/cascades/reference
In other cases LocaleHandler can be used:
http://developer.blackberry.com/cascades/reference
Ideally the screens should be language-aware. If you want to reload everything on language change then destroying the root scene and reloading it from QML should probably work, but current UI state will be lost.
I'm not sure if creating a translation mechanism inside of an app which is alternative to the system one is a good idea. If it's a requirement then the behavior of the two above classes can be mimicked I think. Reloading the entire scene is also an option.
02-15-2013 05:40 AM
Why do you wrote your own language implementation? Why do you not use the internationalization features of the phone itself? The user will choose the language he wants on the phone. I don't think he would set his system language to english, and the language of your app to french... That's ridicolous in my opinion.
Have a look over here
http://developer.blackberry.com/cascades/documenta
02-15-2013 05:50 AM
The app itself have a lot of parameters that set different search systems, images, pages when starts. Everything is different depends on each language.
it's like "ebay.com" and "ebay.it" inside the same app. But if you choose .com, you'll have service/images/banners and pages exclusive for .com, and if you choose .it you'll also have different stuff.
I'll try destroying all and reloading. Thanks