parseLocale(String locale, String variant) Parses the given locale string into its language and (optionally)
country components, and returns the corresponding
java.util.Locale object.
Parses the given locale string into its language and (optionally)
country components, and returns the corresponding
java.util.Locale object.
If the given locale string is null or empty, the runtime's default
locale is returned.
Parameters: locale - the locale string to parse Parameters: variant - the variant java.util.Locale object corresponding to the givenlocale string, or the runtime's default locale if the locale string isnull or empty throws: IllegalArgumentException - if the given locale does not have alanguage component or has an empty country component