/** * Gets the locale name for instance 'de_DE' for the Locale.GERMANY. * * @param locale * the locale * @return the locale name */ public static String getLocaleName(final Locale locale) { return getLocaleFileSuffix(locale, true, true, false); }
/** * Gets the locale file name suffix that has the format 'language_COUNTRY_variant' for instance * 'de_DE' for the Locale.GERMANY. * * @param locale * the locale * @return the locale name */ public static String getLocaleFilenameSuffix(final Locale locale) { return getLocaleFileSuffix(locale, true, true, false); }
/** * Gets the locale file name suffix for instance '_de_DE' for the Locale.GERMANY. * * @param locale * the locale * @param withCountry * the with country * @return the locale file suffix */ public static String getLocaleFileSuffix(final Locale locale, final boolean withCountry) { return getLocaleFileSuffix(locale, withCountry, false); }
/** * Gets the locale file name suffix for instance '_de_DE' for the Locale.GERMANY. * * @param locale * the locale * @param withCountry * with country * @param withVariant * with variant * @return the locale file suffix */ public static String getLocaleFileSuffix(final Locale locale, final boolean withCountry, final boolean withVariant) { return getLocaleFileSuffix(locale, withCountry, withVariant, true); }