I'm looking for a way to implement change of language triggered by button onclick. I have created proper strings.xml in proper folders (for example res/values-en/) Here is my code of the button:
Button setEN_bt = (Button) findViewById(R.id.setEN);
setEN_bt.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Locale locale_en = new Locale("en");
Locale.setDefault(locale_en);
Configuration config_en = new Configuration();
config_en.locale = locale_en;
getBaseContext().getResources().updateConfiguration(config_en, getBaseContext().getResources().getDisplayMetrics());
}
});
So basicly I change the locale with the onclick but the page doesn't refresh afterwards (why should it...:) ). Could somebody tell me how to refresh/reload the activity?
Thanx for help in advance.