问题
How to change the language of runtime permissions in android?
When I'm trying to change the language using
Configuration config = getBaseContext().getResources().getConfiguration();
locale = new Locale(lang);
Locale.setDefault(locale);
Configuration conf = new Configuration(config);
conf.locale = locale;
getBaseContext().getResources().updateConfiguration(conf, getBaseContext().getResources().getDisplayMetrics());
It changes the application language but the permissions for camera such dialogs showing in english only.
Is there any way to change the permission dialog language?
回答1:
Is there any way to change the permission dialog language?
Have the user change their device language.
At most, your approach will change the language used by your app's process (though that may change on Android N). Any system-supplied UI, such as the permission dialog, will use the language chosen by the user for their device.
回答2:
for this you need to create your own dialog or change the language of your cell phone before or after changing the application language.
来源:https://stackoverflow.com/questions/36034048/change-the-language-of-runtime-permission