Code example for Locale

Methods: getCountry, getLanguage

0
        LocaleUtils.setSystemLocale(res, saveLocale);
        return new Pair<Long, Boolean>(dictionaryId, hasLayout);
    } 
 
    private String get5Code(Locale locale) {
        String country = locale.getCountry();
        return locale.getLanguage()
                + (TextUtils.isEmpty(country) ? "" : "_" + country);
    } 
 
    @Override 
    protected void onResume() { 
        super.onResume(); 
    } 
 
    @Override 
    protected void onPause() { 
        super.onPause(); 
        // Save the selected languages 
        String checkedLanguages = "";
        PreferenceGroup parent = getPreferenceScreen();