Android的 - 更改设备的系统区域设置编程 [英] Android - change device system locale programmatically
问题描述
我想从我的应用程序更改设备的语言环境(不只是应用程序地区),喜欢的用户可以在设置中做的 - >语言和放大器;键盘 - >语言
I want to change device locale (not just the application locale) from my app, like the user can do in Settings -> Language & Keyboard -> Language.
有人可以解释如何做到这一点? 我一直在寻找了几个小时,不能找到一种方法。
Can someone please explain how to do it? I've been searching for hours and can not find a way.
推荐答案
该应用程序不会想你想 https://play.google.com/store /apps/details?id=org.gnvo.langpicker&hl=en
This app does want you want https://play.google.com/store/apps/details?id=org.gnvo.langpicker&hl=en
下面是它的源$ C $ C 的https://$c$c.google.com/p/languagepickerwidget/
Here is its source code https://code.google.com/p/languagepickerwidget/
下面是它的主要逻辑 HTTP://bin-liu.blogspot 。在/ 2012/05 /如何对变化的系统语言环境calling.html
Here is its main logic http://bin-liu.blogspot.in/2012/05/how-to-change-system-locale-calling.html
修改
在新的4.2果冻豆,CHANGE_CONFIGURATION的保护级别定义已经更改,所以应用程序将无法正常工作4.2以上,解决办法是的http://droider.eu/2013/07/22/morelocale-2-not-working-on-4-2-2-without-su-or-pm/
After 4.2 new Jelly Bean, The protection level definition of CHANGE_CONFIGURATION has been changed,so the app will not work above 4.2, solution is http://droider.eu/2013/07/22/morelocale-2-not-working-on-4-2-2-without-su-or-pm/
这篇关于Android的 - 更改设备的系统区域设置编程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!