我想知道如何为不同语言命名我的文件夹。我在哪里可以找到Android上支持的语言列表?


当前回答

4.0版本更新

Android 4.0.3平台

Arabic, Egypt (ar_EG)
Arabic, Israel (ar_IL)
Bulgarian, Bulgaria (bg_BG)
Catalan, Spain (ca_ES)
Chinese, PRC (zh_CN)
Chinese, Taiwan (zh_TW)
Croatian, Croatia (hr_HR)
Czech, Czech Republic (cs_CZ)
Danish, Denmark(da_DK)
Dutch, Belgium (nl_BE)
Dutch, Netherlands (nl_NL)
English, Australia (en_AU)
English, Britain (en_GB)
English, Canada (en_CA)
English, India (en_IN)
English, Ireland (en_IE)
English, New Zealand (en_NZ)
English, Singapore(en_SG)
English, South Africa (en_ZA)
English, US (en_US)
Finnish, Finland (fi_FI)
French, Belgium (fr_BE)
French, Canada (fr_CA)
French, France (fr_FR)
French, Switzerland (fr_CH)
German, Austria (de_AT)
German, Germany (de_DE)
German, Liechtenstein (de_LI)
German, Switzerland (de_CH)
Greek, Greece (el_GR)
Hebrew, Israel (he_IL)
Hindi, India (hi_IN)
Hungarian, Hungary (hu_HU)
Indonesian, Indonesia (id_ID)
Italian, Italy (it_IT)
Italian, Switzerland (it_CH)
Japanese (ja_JP)
Korean (ko_KR)
Latvian, Latvia (lv_LV)
Lithuanian, Lithuania (lt_LT)
Norwegian bokmål, Norway (nb_NO)
Polish (pl_PL)
Portuguese, Brazil (pt_BR)
Portuguese, Portugal (pt_PT)
Romanian, Romania (ro_RO)
Russian (ru_RU)
Serbian (sr_RS)
Slovak, Slovakia (sk_SK)
Slovenian, Slovenia (sl_SI)
Spanish (es_ES)
Spanish, US (es_US)
Swedish, Sweden (sv_SE)
Tagalog, Philippines (tl_PH)
Thai, Thailand (th_TH)
Turkish, Turkey (tr_TR)
Ukrainian, Ukraine (uk_UA)
Vietnamese, Vietnam (vi_VN)

来源:http://us.dinodirect.com/Forum/Latest-Posts-5/Android-Versions-and-their-Locales-1-86587/

其他回答

在这里:

public static final Locale  CANADA  Locale constant for en_CA.
public static final Locale  CANADA_FRENCH   Locale constant for fr_CA.
public static final Locale  CHINA   Locale constant for zh_CN.
public static final Locale  CHINESE Locale constant for zh.
public static final Locale  ENGLISH Locale constant for en.
public static final Locale  FRANCE  Locale constant for fr_FR.
public static final Locale  FRENCH  Locale constant for fr.
public static final Locale  GERMAN  Locale constant for de.
public static final Locale  GERMANY Locale constant for de_DE.
public static final Locale  ITALIAN Locale constant for it.
public static final Locale  ITALY   Locale constant for it_IT.
public static final Locale  JAPAN   Locale constant for ja_JP.
public static final Locale  JAPANESE    Locale constant for ja.
public static final Locale  KOREA   Locale constant for ko_KR.
public static final Locale  KOREAN  Locale constant for ko.
public static final Locale  PRC Locale constant for zh_CN.
public static final Locale  ROOT    Locale constant for the root locale.
public static final Locale  SIMPLIFIED_CHINESE  Locale constant for zh_CN.
public static final Locale  TAIWAN  Locale constant for zh_TW.
public static final Locale  TRADITIONAL_CHINESE Locale constant for zh_TW.
public static final Locale  UK  Locale constant for en_GB.
public static final Locale  US  Locale constant for en_US.

查看支持列表的最佳方法是在最新版本中启动模拟器并打开“自定义语言环境”应用程序。这将列出该版本Android支持的所有语言和语言环境。

仅供参考,如果你无法设置任何地区,问题可能是以下属性在你的应用级别gradle文件:

resConfigs "en", "hi" //to specify allowed locales for your app

所以,如果你想支持英语和印地语以外的任何语言环境,在这里指定你的语言环境,或者只是删除上面的行。默认情况下,您的应用程序将支持所有地区。

如果你使用Android Studio,你可以:

右键单击项目中的一个目录>新建> Android资源文件 在Available qualifiers部分中选择Locale并单击>>

你会看到所有语言的列表,如果你选择了它们,你会看到每种语言的特定区域。您还可以输入列表来筛选语言。

从Android 7.0开始,你可以直接从源代码中的语言设置中读取列表。你可以在URL中看到Android版本:

https://android.googlesource.com/platform/frameworks/base/+/android-9.0.0_r1/core/res/res/values/locale_config.xml https://android.googlesource.com/platform/frameworks/base/+/android-8.1.0_r1/core/res/res/values/locale_config.xml https://android.googlesource.com/platform/frameworks/base/+/android-8.0.0_r1/core/res/res/values/locale_config.xml https://android.googlesource.com/platform/frameworks/base/+/android-7.1.2_r1/core/res/res/values/locale_config.xml https://android.googlesource.com/platform/frameworks/base/+/android-7.0.0_r1/core/res/res/values/locale_config.xml

谷歌播放描述的列表是不同的:

https://support.google.com/googleplay/android-developer/table/4419860