What's new
DroidForums.net | Android Forum & News

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Changing locale programmatically on DroidX(2.1 Update 1) does not work !

Marty213

New Member
I am trying to change the locale programmatically on Android. The code I have below works fine on the Incredible(2.2) and Droid(2.2). However, it doesn't on the DroidX(2.1 Update 1)
Anyone here have encountered similar problem ?? Any insight would be helpful.
public void overrideLocale(String languageToLoad) {
Locale locale = new Locale(languageToLoad);
Locale.setDefault(locale);
Configuration config = new Configuration();
config.locale = locale;

getBaseContext().getResources().updateConfiguration(config, null);

Intent intent = new Intent(this, ActivityB.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
}
 
Back
Top