Package org.elasticsearch.common.util
Class LocaleUtils
org.elasticsearch.common.util.LocaleUtils
public class LocaleUtils
extends
Utilities for for dealing with objects
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic
localeStr)
Parse the given locale aslanguage
,language-country
orlanguage-country-variant
.Methods inherited from class java.lang.
, , , , , , , , , ,
-
Constructor Details
-
LocaleUtils
public LocaleUtils()
-
-
Method Details
-
parse
public static parse( localeStr)Parse the given locale aslanguage
,language-country
orlanguage-country-variant
. Either underscores or hyphens may be used as separators, but consistently, ie. you may not use an hyphen to separate the language from the country and an underscore to separate the country from the variant.- Throws:
- if there are too many parts in the locale string
- if the language or country is not recognized
-