How to change the language throughout the application program?
This code for some reason does not change the language in the application, it changes only in the current activity.
public void changeLanguageApp(){ SharedPrefHelper sharedPrefHelper=new SharedPrefHelper(context); Resources res = context.getResources(); DisplayMetrics dm = res.getDisplayMetrics(); Configuration conf = res.getConfiguration(); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { conf.setLocale(new Locale( sharedPrefHelper.getUserLanguage() )); // API 17+ only. } res.updateConfiguration(conf, dm); } How to make it so that when you click on a button, the application changes the language?
In my case, switching works only with a trace. start up