please help me change language in run-time, I have menu setting to change language in application. But when i choose other language when I rotate to landscape form , this language will be lost.How can i keep language after rotation ?
this is code I used :
- Code: Select all
Resources res = v.getResources();
// Change locale settings on the device
DisplayMetrics dm = res.getDisplayMetrics();
android.content.res.Configuration conf = res.getConfiguration();
conf.locale = new Locale("de");
res.updateConfiguration(conf, dm);
Intent intent = new Intent(this, mainActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
Thanks and best regards,
landy


