android Amlogic修改语言

android amlogic 客户配置文件大部分位于device/amlogic目录下,
设定语言在device/amlogic/c03ref/c03ref.mk中的PRODUCT_LOCALES 

支持的多语言在build/target/product/languages_small.mk和build/target/product/languages_full.mk中
语言的判断在external/icu4c/stubdata/Android.mk中下面这段:config := $(word 1, \            $(if $(findstring ar,$(PRODUCT_LOCALES)),large) \            $(if $(findstring da,$(PRODUCT_LOCALES)),large) \            $(if $(findstring el,$(PRODUCT_LOCALES)),large) \            $(if $(findstring fi,$(PRODUCT_LOCALES)),large) \            $(if $(findstring he,$(PRODUCT_LOCALES)),large) \            $(if $(findstring hr,$(PRODUCT_LOCALES)),large) \            $(if $(findstring hu,$(PRODUCT_LOCALES)),large) \            $(if $(findstring id,$(PRODUCT_LOCALES)),large) \            $(if $(findstring ko,$(PRODUCT_LOCALES)),large) \            $(if $(findstring nb,$(PRODUCT_LOCALES)),large) \            $(if $(findstring pt,$(PRODUCT_LOCALES)),large) \            $(if $(findstring ro,$(PRODUCT_LOCALES)),large) \            $(if $(findstring ru,$(PRODUCT_LOCALES)),large) \            $(if $(findstring sk,$(PRODUCT_LOCALES)),large) \            $(if $(findstring sr,$(PRODUCT_LOCALES)),large) \            $(if $(findstring sv,$(PRODUCT_LOCALES)),large) \            $(if $(findstring th,$(PRODUCT_LOCALES)),large) \            $(if $(findstring tr,$(PRODUCT_LOCALES)),large) \            $(if $(findstring uk,$(PRODUCT_LOCALES)),large) \            $(if $(findstring zh,$(PRODUCT_LOCALES)),large) \            $(if $(findstring ja,$(PRODUCT_LOCALES)),us-japan) \            $(if $(findstring it,$(PRODUCT_LOCALES)),us-euro) \            $(if $(findstring pl,$(PRODUCT_LOCALES)),us-euro) \            $(if $(findstring cs,$(PRODUCT_LOCALES)),default) \            $(if $(findstring de,$(PRODUCT_LOCALES)),default) \            $(if $(findstring fr,$(PRODUCT_LOCALES)),default) \            $(if $(findstring nl,$(PRODUCT_LOCALES)),default) \            us)
include $(LOCAL_PATH)/root.mk
PRODUCT_COPY_FILES += $(LOCAL_PATH)/$(root)-$(config).dat:/system/usr/icu/$(root).dat
选择默认语言,依靠build/core/Makefile中下面这段来实现:# Selects the first locale in the list given as the argument,# and splits it into language and region, which each may be# empty.define default-locale$(subst _, , $(firstword $(1)))endef
# Selects the first locale in the list given as the argument# and returns the language (or the region)define default-locale-language$(word 2, 2, $(call default-locale, $(1)))endefdefine default-locale-region$(word 3, 3, $(call default-locale, $(1)))endef

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值