I want to change the language of the app and this works fine until API 26.
For api > 25 I put Locale.setDefault(Locale.Category.DISPLAY, mynewlanglocale);
It is possible, however i would not recommend to set the language programatically
Android is designed so the System UI and your App have the same language, if you change it programmatically you would be fighting the system
Instead what you can do is enable multilanguage support by adding different strings.xml languages, this will change the language automatically
I reccommend reading through this Google Developers article:
Supporting Different Languages and Cultures
If you really need to change it programatically you can do the following
Locale locale = new Locale("en");
Locale.setDefault(locale);
Configuration config = context.getResources().getConfiguration();
config.setLocale(locale);
context.createConfigurationContext(config);
context.getResources().updateConfiguration(config, context.getResources().getDisplayMetrics());
On SDK >= 21, you need to call 'Resources.updateConfiguration()', otherwise resources will not be updated.
Hope it helps.