java.lang.Object
org.elasticsearch.common.util.LocaleUtils
Utilities for dealing with
Locale objects-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
LocaleUtils
public LocaleUtils()
-
-
Method Details
-
parse
Parse the given locale aslanguage,language-countryorlanguage-country-variant. Either underscores or hyphens may be used as separators, but consistently, i.e. you may not use a hyphen to separate the language from the country and an underscore to separate the country from the variant.- Throws:
IllegalArgumentException- if there are too many parts in the locale stringIllegalArgumentException- if the language or country is not recognized
-