当前位置:   article > 正文

2021-01-14 Android系统修改出厂默认语言_build configuration language

build configuration language

                            Android系统修改出厂默认语言

 

一、方法一,修改\build\target\product\languages_full.mk文件,从PRODUCT_LOCALES里选择第一个语言作为默认语言,下图是默认英文美国。

  1. #
  2. # Copyright (C) 2009 The Android Open Source Project
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. #
  16. # This is a build configuration that just contains a list of languages.
  17. # It helps in situations where languages must come first in the list,
  18. # mostly because screen densities interfere with the list of locales and
  19. # the system misbehaves when a density is the first locale.
  20. # These are all the locales that have translations and are displayable
  21. # by TextView in this branch.
  22. 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 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 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 sq_AL gu_IN pa_IN be_BY bs_BA

二、修改build\tools\buildinfo.sh,增加下面内容。

  1. echo "persist.sys.language=zh"
  2. echo "persist.sys.country=CN"
  3. echo "ro.product.locale.language=zh"
  4. echo "ro.product.locale.region=CN"

 

三、测试ok。

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Gausst松鼠会/article/detail/196737
推荐阅读