Skip to content

Android System Locale

When the board leaves the factory, the default locale of the pre-installed Android system might be English. To set it to another locale, follow the instructions in this section to specify the device's default locale setting.

Rockchip Configure Default Locale

File to modify:

build/target/product/full_base.mk

Modification diff:

!!! Note In the original configuration, PRODUCT_LOCALES := en_US indicates the default country is the United States (US).
After modification, PRODUCT_LOCALES := zh_CN changes the default country to China (CN).

--- a/build/target/product/full_base.mk
+++ b/build/target/product/full_base.mk

- PRODUCT_LOCALES := en_US
+ PRODUCT_LOCALES := zh_CN

AllWinner Configure Default Locale

1. persist.sys.locale is a persistent system property. Setting it to zh-CN will make the system use Chinese (Mainland China) as the default language and region configuration.

vim device/softwinner/apollo/apollo_p2.mk
    PRODUCT_PROPERTY_OVERRIDES += \
        persist.sys.locale=zh-CN

!!! Note In the original configuration, persist.sys.country=US and persist.sys.language=en indicate the default country is the United States (US) and the default language is English (en).
After modification, persist.sys.country=CN and persist.sys.language=zh change the default country to China (CN) and the default language to Chinese (zh).

--- a/device/softwinner/apollo/apollo_p2.mk
+++ b/device/softwinner/apollo/apollo_p2.mk
@@ -32,8 +32,8 @@ PRODUCT_PACKAGES += FT618

 PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \
     persist.sys.timezone=Asia/Shanghai \
-    persist.sys.country=US \
-    persist.sys.language=en
+    persist.sys.country=CN \
+    persist.sys.language=zh

2. In the Android system, the priority logic for obtaining the locale is related to the initialization process in AndroidRuntime.cpp.

frameworks/base/core/jni/AndroidRuntime.cpp