adb 命令设置android语言,emulator启动模拟器的时候设置语言

来源:互联网 发布:淘宝开店ps教程 编辑:程序博客网 时间:2024/05/29 18:37
adb 命令设置android语言$ adb shell '
setprop persist.sys.language en;
setprop persist.sys.country GB;
stop;
sleep 5;
start'
验证语言
$ adb shell 'getprop persist.sys.language'

emulator启动模拟器的时候设置语言

emulator -avd my_avd -prop persist.sys.language=en -prop persist.sys.country=GB

语言ISO

Configuration

Qualifier Values

Description

MCC and MNC

Examples:
mcc310
mcc310-mnc004
mcc208-mnc00
etc.

The mobile country code (MCC), optionally followed by mobile network code (MNC) from the SIM card in the device. For example,mcc310 is U.S. on any carrier, mcc310-mnc004 is U.S. on Verizon, andmcc208-mnc00 is France on Orange.

If the device uses a radio connection (GSM phone), the MCC and MNC values come from the SIM card.

You can also use the MCC alone (for example, to include country-specific legal resources in your application). If you need to specify based on the language only, then use thelanguage and region qualifier instead (discussed next). If you decide to use the MCC and MNC qualifier, you should do so with care and test that it works as expected.

Also see the configuration fields mcc, andmnc, which indicate the current mobile country code and mobile network code, respectively.

Language and region

Examples:
en
fr
en-rUS
fr-rFR
fr-rCA
etc.

The language is defined by a two-letter ISO 639-1 language code, optionally followed by a two letter ISO 3166-1-alpha-2 region code (preceded by lowercase "r").

The codes are not case-sensitive; the r prefix is used to distinguish the region portion. You cannot specify a region alone.

This can change during the life of your application if the user changes his or her language in the system settings. SeeHandling Runtime Changes for information about how this can affect your application during runtime.

See Localization for a complete guide to localizing your application for other languages.

Also see the locale configuration field, which indicates the current locale.


原创粉丝点击