Manually Set the Locale of the Application in Android

I am currently facing a problem with the locale and I need to set 3 different types of language support in the application. So based on the selection, the application must change its locale.
 
For all you guys, following the below mentioned code will lead to solving this problem.
 
Resources res = getResources();
Configuration newConfig = new Configuration(res.getConfiguration());
newConfig.locale = Locale.ENGLISH;
res.updateConfiguration(newConfig, null);
 
All you need to do is write this code in the "onResume()" method. And this will set the locale "ENLISH" to your application.
Ebook Download
View all
Learn
View all