I am relatively new to Android and want to know how to change the language of my app on the click of a button? I have extracted all the text and stored was string resources and set up new string resource files for each of the languages. My problem is around the mainActivity.java
class.
Asked
Active
Viewed 54 times
0
-
Normally the user does it by setting the phone's locale. – Gabe Sechan Apr 14 '16 at 21:28
-
http://stackoverflow.com/questions/2900023/change-language-programatically-in-android – localized Apr 14 '16 at 22:08
1 Answers
0
There is a library for the behaviour you want. It is called the localization library. You have to extend the libraries LocalizationActivity. You can than use setLanguage("en"); to change the language of your application at runtime. There is also a sample project available on the libraries GitHub page.

Rockney
- 10,380
- 2
- 20
- 26