1.在external/icu4c/data/locales/底下新增es_MX.txt 內容如下:
es_MX{
Currencies{
MXN{
"$",
"peso mexicano",
}
}
NumberElements{
".",
",",
";",
"%",
"0",
"#",
"-",
"E",
"\u2030",
"\u221e",
"NaN",
"+",
}
PaperSize:intvector{
279,
216,
}
Version{"1.53"}
calendar{
gregorian{
DateTimeElements:intvector{
1,
4,
}
}
}
}
2.在icu4c 底下mkdir icuBuild 然後cd external/icu4c/icuBuild 執行命令 ../runConfigureICU Linux
3.運行 make -j 2
4.把icu4c/icuBuild/data/out/tmp/icudt42l.dat 復制到 icu4c/stubdata/下面, 替換icudt42l-all.dat
5.修改icudt42l-large.txt文件,增加es_MX.res、coll/es_MX.res
6.執行./icu_dat_generator.py 4.2 這裡可能有錯,解決方法為:把icu4c/icuBuild/bin/底下的gencnval genrb icupkg makeconv 復制到 prebuilt/linux-x86/icu-4.2/底下,替換原來的文件,再運行該命令就可以了 cp -rf gencnval genrb icupkg makeconv ../../../../prebuilt/linux-x86/icu-4.2/
7.在framework/base/core/res/res/底下新建 values-es-rMX/文件夾,把donottranslate-cldr.xml strings.xml兩個文件加入
8.修改vender/sprd/product/sprdroid_base.mk 中PRODUCT_LOCALES的值,增加es_MX
更多Android相關信息見Android 專題頁面 http://www.linuxidc.com/topicnews.aspx?tid=11