Android4.0 删除希伯来语

        正常思路应该是在build/target/product/languages_full.mk 或者languages_small.mk中操作:

PRODUCT_LOCALES := en_US fr_FR it_IT es_ES de_DE nl_NL cs_CZ pl_PL ja_JP zh_TW zh_CN ru_RU ko_KR nb_NO es_US da_DK el_GR tr_TR pt_PT     pt_BR rm_CH 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 f    a_IR th_TH sw_TZ ms_MY af_ZA zu_ZA am_ET hi_IN

直接去除对应国家语言。

        可是任我怎么折腾也是没去除成功,没办法只能在源码里面去屏蔽。

frameworks\base\core\java\com\android\internal\app\LocalePicker.java

public static ArrayAdapter<LocaleInfo> constructAdapter(Context context,
            int layoutId, int fieldId) {
        final Resources resources = context.getResources();
        final String[] locales = Resources.getSystem().getAssets().getLocales();
        final String[] specialLocaleCodes = resources.getStringArray(R.array.special_locale_codes);
        final String[] specialLocaleNames = resources.getStringArray(R.array.special_locale_names);
        Arrays.sort(locales);
        final int origSize = locales.length;
        final LocaleInfo[] preprocess = new LocaleInfo[origSize];
        int finalSize = 0;
        for (int i = 0 ; i < origSize; i++ ) {
            final String s = locales[i];
            final int len = s.length();
            if (len == 5) {
                String language = s.substring(0, 2);
                String country = s.substring(3, 5);
                if (language.equals("iw") && country.equals("IL"))//删除对应的希伯来语
                    continue;

                final Locale l = new Locale(language, country);
                
                Log.v(TAG, "========language="+language+"==cao===country="+country);
....................................

你可能感兴趣的:(java,android,String,语言,resources,frameworks)