Last Updated: February 25, 2016
·
932
· drdrej

How to change Lang from Activity [Android]

An easy way to change system-locale temporarly in an android-app:

final Resources res = this.getResources();

final DisplayMetrics dm = res.getDisplayMetrics();
android.content.res.Configuration conf = res.getConfiguration();

conf.locale = locale;
res.updateConfiguration(conf, dm);

have fun! drdrej