Android5.1 多国语言、多国时区

 一.多国语言 如果屏蔽掉 大部分语言 编译系统Setting.apk 效率更高

diff --git a/build/target/product/languages_full.mk b/build/target/product/languages_full.mk
index e9414f7..90bf804 100755
--- a/build/target/product/languages_full.mk
+++ b/build/target/product/languages_full.mk
@@ -21,5 +21,5 @@
 
 # These are all the locales that have translations and are displayable
 # by TextView in this branch.
-# PRODUCT_LOCALES := en_US en_AU en_IN fr_FR it_IT es_ES et_EE de_DE nl_NL cs_CZ pl_PL ja_JP zh_TW zh_CN zh_HK ru_RU ko_KR nb_NO es_US da_DK el_GR tr_TR pt_PT pt_BR rm_CH sv_SE bg_BG ca_ES en_GB fi_FI hi_IN hr_HR hu_HU in_ID iw_IL lt_LT lv_LV ro_RO sk_SK sl_SI sr_RS uk_UA vi_VN tl_PH ar_EG fa_IR th_TH sw_TZ ms_MY af_ZA zu_ZA am_ET hi_IN en_XA ar_XB fr_CA km_KH lo_LA ne_NP si_LK mn_MN hy_AM az_AZ ka_GE my_MM mr_IN ml_IN is_IS mk_MK ky_KG eu_ES gl_ES bn_BD ta_IN kn_IN te_IN uz_UZ ur_PK kk_KZ
-PRODUCT_LOCALES := en_US en_GB zh_CN zh_HK
\ No newline at end of file
+PRODUCT_LOCALES := en_US en_AU en_IN fr_FR it_IT es_ES et_EE de_DE nl_NL cs_CZ pl_PL ja_JP zh_TW zh_CN zh_HK ru_RU ko_KR nb_NO es_US da_DK el_GR tr_TR pt_PT pt_BR rm_CH sv_SE bg_BG ca_ES en_GB fi_FI hi_IN hr_HR hu_HU in_ID iw_IL lt_LT lv_LV ro_RO sk_SK sl_SI sr_RS uk_UA vi_VN tl_PH ar_EG fa_IR th_TH sw_TZ ms_MY af_ZA zu_ZA am_ET hi_IN en_XA ar_XB fr_CA km_KH lo_LA ne_NP si_LK mn_MN hy_AM az_AZ ka_GE my_MM mr_IN ml_IN is_IS mk_MK ky_KG eu_ES gl_ES bn_BD ta_IN kn_IN te_IN uz_UZ ur_PK kk_KZ
+#PRODUCT_LOCALES := en_US en_GB zh_CN zh_HK
\ No newline at end of file
diff --git a/build/target/product/locales_full.mk b/build/target/product/locales_full.mk
index ae06e2c..11bc6c8 100755
--- a/build/target/product/locales_full.mk
+++ b/build/target/product/locales_full.mk
@@ -1,3 +1,3 @@
-#PRODUCT_LOCALES := en_US cs_CZ da_DK de_AT de_CH de_DE de_LI el_GR en_AU en_CA en_GB en_NZ en_SG eo_EU es_ES fr_CA fr_CH fr_BE fr_FR it_CH it_IT ja_JP ko_KR nb_NO nl_BE nl_NL pl_PL pt_PT ru_RU sv_SE tr_TR zh_CN zh_HK zh_TW am_ET hi_IN
-PRODUCT_LOCALES := en_US en_GB zh_CN zh_HK
+PRODUCT_LOCALES := en_US cs_CZ da_DK de_AT de_CH de_DE de_LI el_GR en_AU en_CA en_GB en_NZ en_SG eo_EU es_ES fr_CA fr_CH fr_BE fr_FR it_CH it_IT ja_JP ko_KR nb_NO nl_BE nl_NL pl_PL pt_PT ru_RU sv_SE tr_TR zh_CN zh_HK zh_TW am_ET hi_IN
+#PRODUCT_LOCALES := en_US en_GB zh_CN zh_HK
 $(call inherit-product, build/target/product/languages_full.mk)

 1.2.默认香港 繁体字 样式

persist.sys.country=HK
persist.sys.language=zh

 

二.多国时区

persist.sys.timezone=Asia/Shanghai
getprop persist.sys.timezone
setprop persist.sys.timezone Asia/Shanghai

persist.sys.timezone属性的对应值在如下文件中,frameworks\base\core\res\res\xml\time_zones_by_country.xml
这个xml文件中可以找到中国所在的 GMT + 8:00时区的对应值

    <!-- CHINA, 8:00 -->

    <timezone code="cn">Asia/Shanghai</timezone>
    <timezone code="cn">Asia/Harbin</timezone>
    <timezone code="cn">Asia/Chongqing</timezone>
    <timezone code="cn">Asia/Urumqi</timezone>
    <timezone code="cn">Asia/Kashgar</timezone>

  

  

 

  

 

posted @ 2020-12-19 10:23  CrushGirl  阅读(617)  评论(0编辑  收藏  举报