I am trying to do localization to my android application. The error message is not changed unless i force stop the app and start it after the language is changed.
public interface ApplicationConstants {
Resources res = MyActivity.getInstance().getAppContext().getResources();
public static final String NETWORK_ERROR_MESS=res.getString(R.string.str_network_error);
public static final String AUTH_ERR=res.getString(R.string.str_auth_error);
}
In res-> values
folder
Strings.xml
<string name="str_network_error"> Network Error english.</string>
<string name="str_auth_error">Authentication failure english.</string>
In res-> values-fr
folder
Strings.xml
<string name="str_network_error"> Network Error france.</string>
<string name="str_auth_error">Authentication failure france.</string>