In my android app I need to do something like this: I have 5 languages. When app starts the user choose one of them from a spinner list. For each language there is a string.xml file. The question is: there is possible what I'm trying to do or not?
Asked
Active
Viewed 2,682 times
4 Answers
2
Implement the tutorial for localization. It's only only a few steps and well-explained.

galath
- 5,717
- 10
- 29
- 41
1
A setup like that would be unneccessary as the Android system handles this. Having your different language xml files will suffice (make sure you name them correctly, see the link posted by Raz). Android picks out the right file based on the language selected by the user within the Android OS settings.

Will Kru
- 5,164
- 3
- 28
- 41
-
But he wants to change this himself everytime his app starts. Also he does not want change the System Locale. He wants to change the App Locale only. – Vishnu Haridas Aug 03 '11 at 12:37
-
That's not what he stated. He might not know about Android handling this. – Will Kru Aug 03 '11 at 12:40
-
Yes,Vishnu Haridas you right...this I want to do...I don't want that user to go from app to phone's settings to change the language – Gabrielle Aug 03 '11 at 12:41
-
Yes, that's possible by programmatically changing the Locale inside your App. I think there are already 3 same answers here! – Vishnu Haridas Aug 03 '11 at 12:46
1
Yes, you can do this by changing the Locale of the application. There's a similar question in here, see Changing Locale within the app itself

Community
- 1
- 1

Vishnu Haridas
- 7,355
- 3
- 28
- 43
0
Yes, it is. Details: http://developer.android.com/guide/topics/resources/localization.html

Rayne
- 2,620
- 20
- 28