Home keyboard_arrow_right Questions keyboard_arrow_right #Android
Language view change in android
question
0
Pavithra Sri
May 8, 2018
asked 2 years ago
viewed 543 times

according to the selected language how to display string values and view by using android code

1 Answer
Android Pal @pal May 8, 2018

You should localize your string resources. For example by default you might have a file called strings.xml in /res/values and strings.xml in /res/values-de for German translations.


If you meant how you can change the language at run-time programmatically then you might want to look into Locale.setDefault, for example to change to German:


Locale.setDefault(Locale.GERMANY);


1

sign in Sign in to add your reply or comment.

delete_forever
Careful now...
Doing this you will loose this information and the action cannot be undone.
This action cannot be undone.
cancel