java.lang.Object
io.sf.jclf.util.locale.LocaleParser
Parses a String for a Locale.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Locale
parseHttpLocale
(String loc) Parses an HTTP accept-language String to return a Locale.static Locale
parseLocale
(String loc) Parses a String to return a Locale.
-
Constructor Details
-
LocaleParser
public LocaleParser()
-
-
Method Details
-
parseLocale
Parses a String to return a Locale.- Parameters:
loc
- a String with the locale specification- Returns:
- the corresponding Locale object
-
parseHttpLocale
Parses an HTTP accept-language String to return a Locale.- Parameters:
loc
- an HTTP accept-language String with the locale specification- Returns:
- the corresponding Locale object
-