Example usage for org.apache.commons.lang3 LocaleUtils availableLocaleSet

List of usage examples for org.apache.commons.lang3 LocaleUtils availableLocaleSet

Introduction

In this page you can find the example usage for org.apache.commons.lang3 LocaleUtils availableLocaleSet.

Prototype

public static Set<Locale> availableLocaleSet() 

Source Link

Document

Obtains an unmodifiable set of installed locales.

This method is a wrapper around Locale#getAvailableLocales() .

Usage

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());
}