I am developing an application that should be open directly in Portuguese, and inside this application it has the ability to change the language to English. Therefore, I have to change the language in the code. But when I tested my application in Lollipop, it immediately opens in English. In all other versions, except for lollipops, it works fine. Can someone help me or suggest me the steps that I should take to solve this problem. Thanks
Here is the code that I use for localization. Were any methods "discounted" from the candy?
public static Locale locale = new Locale("pt_BR"); Locale.setDefault(locale); android.content.res.Configuration config = new android.content.res.Configuration(); config.locale = locale; this.getResources().updateConfiguration(config, null); String locale = this.getResources().getConfiguration().locale .getDisplayName(); Log.i("System out", "(LogIn)Current Language : " + locale);
source share