change my device language byc code but its not reflect in device [duplicate]

StackOverflow https://stackoverflow.com/questions/18181157

  •  24-06-2022
  •  | 
  •  

سؤال

I want to change my device language programmatically and execute below code after if the device language isn't changed

Locale locale=new Locale("de");  //Chinese    
Locale.setDefault(locale);

How can I do that?

هل كانت مفيدة؟

المحلول

Here is a fairly definitive answer to something i feel you may be misunderstanding. The method you are using will only set the language for the application context upon which you set the language configuration. Only your app will run with the new languages settings. A global change will require raised permissions and possibly root access.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top