java 在 Android 模拟器中更改语言环境

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5167227/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-30 09:47:18  来源:igfitidea点击:

Changing Locale in Android Emulator

javaandroidandroid-emulatorlocale

提问by Veera

I'm just starting to learn Android development. I have included a EditText component in my view and started the emulator in Eclipse.

我刚刚开始学习Android开发。我在视图中包含了一个 EditText 组件并在 Eclipse 中启动了模拟器。

When I type in the Textbox, the auto suggestions are coming up in Chinese language but I want to change this to English.

当我在文本框中输入时,自动建议以中文出现,但我想将其更改为英文。

How do I change this Locale and Android Emulator?

如何更改此语言环境和 Android 模拟器?

I'm using the Android 2.1 for development.

我正在使用 Android 2.1 进行开发。

采纳答案by alvin

No Need to change local, just long press on the EditText widget, on the popup menu select input method, and change to the android keyboard.

无需更改本地,只需长按 EditText 小部件,在弹出菜单上选择输入法,然后更改为 android 键盘。

回答by intertag

I am using the emulator with Android 4.2 + 4.3 and there is an app to set the locale called "Custom Locale".

我在 Android 4.2 + 4.3 上使用模拟器,并且有一个应用程序可以设置名为“自定义语言环境”的语言环境。

Start emulator -> Launcher -> Custom Locale
=> Select the desired language from the list
=> Confirm with e.g "Select 'de_DE'"

启动模拟器 -> 启动器 -> 自定义区域设置
=> 从列表中选择所需的语言
=> 确认例如“选择'de_DE'”

回答by denys

My solution is to use preinstalled on android emulator "Custom locale" application. Simply send intent with extra language parameter to it as below:

我的解决方案是使用预装在 android 模拟器“自定义语言环境”应用程序上。只需将带有额外语言参数的意图发送给它,如下所示:

adb shell am broadcast -a com.android.intent.action.SET_LOCALE --es com.android.intent.extra.LOCALE EN

More information here - prepare android emulator for UI test automation.

此处的更多信息 -为 UI 测试自动化准备 android 模拟器。

回答by Maaalte

I'm using 2.3.3, but it should be similar:

我正在使用 2.3.3,但它应该是类似的:

Start emulator -> Launcher -> Settings -> Language & keyboard -> Select language

启动模拟器 -> 启动器 -> 设置 -> 语言和键盘 -> 选择语言