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 means language:English, Country: USA.
After modification, PRODUCT_LOCALES := zh_CN means language:Simplified Chinese,Country:PRC China .

--- 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.

Warning

In Android, and many programming language, \ serve as a line connector to make multi-line text to a single string, make sure there is NO whitespace or other characters after reverse slash \ .

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

!!! Note In the original configuration, PRODUCT_LOCALES := en_US means language:English, Country: USA.
After modification, PRODUCT_LOCALES := zh_CN means language:Simplified Chinese,Country:PRC China .

--- 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