I dont know that it can be changed programatically, but after you changed your app language you can ask user to change device language also,
Ask user to change device language
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.setClassName("com.android.settings", "com.android.settings.LanguageSettings");
startActivity(intent);
Change app language
<activity
android:name=".ui.SomeActivity"
android:configChanges="locale"
:
:
</activity>
public static void setLanguage(Context context, String languageToLoad) {
Log.d(TAG, "setting language");
Locale locale = new Locale(languageToLoad); //e.g "sv"
Locale systemLocale = SystemLocale.getInstance().getCurrentLocale(context);
if (systemLocale != null && systemLocale.equals(locale)) {
Log.d(TAG, "Already correct language set");
return;
}
Locale.setDefault(locale);
android.content.res.Configuration config = new android.content.res.Configuration();
config.locale = locale;
context.getResources().updateConfiguration(config, context.getResources().getDisplayMetrics());
Log.d(TAG, "Language set");
}