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?
4 Answers
1 Comment
Vishnu Haridas
That's nice, and well explained!
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.
4 Comments
Vishnu Haridas
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.
Will Kru
That's not what he stated. He might not know about Android handling this.
Gabrielle
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
Vishnu Haridas
Yes, that's possible by programmatically changing the Locale inside your App. I think there are already 3 same answers here!
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