Locales的资源存储在哪里?

时间:2016-03-23 17:48:22

标签: java android locale

当您在Android中指定区域设置时,它将更改为Date提供的字符串等。因此,如果我将我的区域设置更改为法语,法国,我的Android日期选择器将显示" Mardi"而不是"星期一"。

这些翻译存储在哪里?我已经将代码一直跟踪到libcore.icu.LocaleData,但我无法弄清楚它在哪里获得翻译。例如,在下面的代码中,(link)他们在哪里发现它们填充public String[] longMonthNames;?我已经抓住了回购,无法找到资源。

package libcore.icu;
public final class LocaleData {
    // A cache for the locale-specific data.
    private static final HashMap<String, LocaleData> localeDataCache = new HashMap<String, LocaleData>();
    static {
        // Ensure that we pull in the locale data for the root locale, en_US, and the
        // user's default locale. (All devices must support the root locale and en_US,
        // and they're used for various system things like HTTP headers.) Pre-populating
        // the cache is especially useful on Android because we'll share this via the Zygote.
        get(Locale.ROOT);
        get(Locale.US);
        get(Locale.getDefault());
    }
    // Used by Calendar.
    public Integer firstDayOfWeek;
    public Integer minimalDaysInFirstWeek;
    // Used by DateFormatSymbols.
    public String[] amPm; // "AM", "PM".
    public String[] eras; // "BC", "AD".
    public String[] longMonthNames; // "January", ...
    public String[] shortMonthNames; // "Jan", ...
    public String[] tinyMonthNames; // "J", ...
    public String[] longStandAloneMonthNames; // "January", ...
    public String[] shortStandAloneMonthNames; // "Jan", ...
    public String[] tinyStandAloneMonthNames; // "J", ...

我需要这样做的原因是因为我需要覆盖一些

1 个答案:

答案 0 :(得分:0)

Android的翻译存储在

/ SDK /平台/机器人-21 /数据/ RES /