static { Locale locale = Locale.getDefault(); COUNTRY = locale == null ? DEFAULT_COUNTRY : locale.getCountry(); String language = locale == null ? DEFAULT_LANGUAGE : locale.getLanguage(); // Special case Chinese if (Locale.SIMPLIFIED_CHINESE.getLanguage().equals(language)) { language += "-r" + COUNTRY; } LANGUAGE = language; }
private static String getSystemLanguage() { Locale locale = Locale.getDefault(); if (locale == null) { return DEFAULT_LANGUAGE; } String language = locale.getLanguage(); // Special case Chinese if (Locale.SIMPLIFIED_CHINESE.getLanguage().equals(language)) { return language + "-r" + getSystemCountry(); } return language; }