更改Android键盘语言 [英] Change Android KeyBoard language

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

问题描述

如何更改Android键盘语言?

我已经设置低于code设置语言。 我设置不同的语言从设置中,试图把英语。

  Locale.setDefault(Locale.ENGLISH);
配置配置= getResources()getConfiguration()。
config.locale = Locale.ENGLISH;
getBaseContext()getResources()updateConfiguration(配置,为空)。;
 

解决方案

修改区域只改变了资源(例如,字符串,图像等),以对那些在一个应用程序的特定区域定义。要改变由键盘支持的语言,你必须确保正确的输入法安装在设备上 (因为输入方法本身也是一个应用程序,它会改变到相应的语言)。

例如,仅有的英语的键盘上的的Nexus S ,如果我需要支持其他语言的键盘,我需要找到一个输入法支持该语言,并安装它。

要确保用户有一个,你可以做一些警觉,采取用户的注意力,或者通过 ACTION_XXX_SETTINGS 意图把他们带到键盘设置活动。

How to change Android Keyboard language?

I have set below code to set language. I set different language from Settings and trying to set English language.

Locale.setDefault(Locale.ENGLISH);
Configuration config = getResources().getConfiguration();
config.locale = Locale.ENGLISH;
getBaseContext().getResources().updateConfiguration(config, null);

解决方案

Changing locale only changes the resources (e.g., strings, images, etc) to those defined for a specific locale in an app. To change the language supported by the keyboard, you have to make sure a proper input method is installed on the device (because the input method itself is also an app, it will change to a corresponding language).

For example, there is only English keyboard on Nexus S, if I need a keyboard that supports other language, I need to find a input method that supports that language, and install it.

To make sure the user have one, you can make some alert to take the users' attention, or bring them to the keyboard settings activity by ACTION_XXX_SETTINGS intent.

这篇关于更改Android键盘语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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