更改语言设置(区域)的装置 [英] Change language settings (locale) for the device

查看:122
本文介绍了更改语言设置(区域)的装置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这是可能有多个语言通过RES /字符串的单个应用程序,并根据语言环境。 这里有一个案例 <一href="http://stackoverflow.com/questions/2078289/android-controling-the-user-language">http://stackoverflow.com/questions/2078289/android-controling-the-user-language

I know it's possible to have multiple languages in a single application through the res/string and depending on Locale. Here is a case http://stackoverflow.com/questions/2078289/android-controling-the-user-language

现在我怎么可以更改手机中的语言? 就像我会做用 菜单>设置>语言和放大器;键盘>选择语言环境>语言

Now how can I change the language in the phone ? Like I'd do by Menu > Settings > Language & Keyboard > Select locale > languages

有一些真正的code来访问这些设置吗? 或者我应该创造意图的语言设置的快捷方式。 请张贴一些code

Is there some real code to access to these settings ? Or should I create intent for a shortcut to the language settings. Please post some code

编辑: 由于Locale类 developer.android.com/intl/fr/reference/java/util/Locale.html

Edit : With Locale class developer.android.com/intl/fr/reference/java/util/Locale.html

构造至少是区域设置(String语言) 输入是语言。 你怎么能检索设备当前使用的语言?

The constructor is at least Locale(String language) The input is language. How can you retrieve the current language used on the device ?

推荐答案

不知道有关直接从应用程序设置,但如果你要发送的用户那里去改变它自己,试试这个:

Not sure about setting it directly from the app, but if you want to send the user there to change it themselves, try this:

Intent intent = new Intent(Intent.ACTION_MAIN);
intent.setClassName("com.android.settings", "com.android.settings.LanguageSettings");            
startActivity(intent);

这篇关于更改语言设置(区域)的装置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆