I'm trying to change the app language in Java-Based Android. This is the function:
public void setLocale(String lang) {
Locale locale = new Locale(lang);
Configuration config = new Configuration();
Locale.setDefault(locale);
config.locale = locale;
getBaseContext().getResources().updateConfiguration(config, null);
finish();
startActivity(getIntent());
}
This function is from another question like "how to change the application language", BUT IT WORKS ONLY ONCE (for example from English to Hebrew).
this is not a dublicate question
Can you please help me?