views:

848

answers:

2

hi, I have a multi language app. I want to give the user the ability to control which language to use. that mean that even if he has the English Locale he could use a different language if he wants. How can I change the Locale language? (per app) Thanks....

+2  A: 
Christopher
o.k - rephrasing:if I set a few languages in my app.but the user locale is french but from some reason the user don't want to use the french language - he wants to use the English version (only for that app - not changing the user locale)I want to make a menu that the user can change the language. I know how to do that in code but I want to use the i18n of android...OR { in one sentense :) }can I choose which language to use independantly of the user locale?
gilmad
It's a system-wide setting. If you wanted to change language independently within your app, you'd have to write your own solution for handling strings outside of the Android i18n system. However, you could maybe use the `ResourceBundle` class (I haven't tried it myself) to see if you can get access to Android string resources you have declared.
Christopher
A: 

Some apps like BetterKeyboard need to change some system settings for it to work. Instead of changing it themselves, they have a button that sends the user to the exact window where info should be changed. I guess that's done with an Intent. If I were you, I would try to achieve that. If user want's to change his/her locale, send him/her to the locale settings of their phone.

Macarse