List of usage examples for org.apache.commons.lang3 LocaleUtils availableLocaleSet
public static Set<Locale> availableLocaleSet()
Obtains an unmodifiable set of installed locales.
This method is a wrapper around Locale#getAvailableLocales() .
From source file:org.lockss.util.MetadataUtil.java
/** Return the closest matching available Locale, or null if none. Looks * for an exact match, then an exact match after dropping the variant (if * any), then after dropping the country (if any). * @param targetLocale the target Locale * @return the closest matching Locale or null */// w w w .j a v a 2 s . c o m public static Locale findClosestAvailableLocale(Locale targetLocale) { return findClosestLocale(targetLocale, (Set<Locale>) LocaleUtils.availableLocaleSet()); }