org.apache.myfaces.util
Class LocaleUtils
java.lang.Object
org.apache.myfaces.util.LocaleUtils
public class LocaleUtils
extends java.lang.Object
- Anton Koinov (latest modification by $Author$)
static Locale | converterTagLocaleFromString(String name) - Convert locale string used by converter tags to locale.
|
static Locale | toLocale(String localeString) - Converts a locale string to
Locale class.
|
converterTagLocaleFromString
public static Locale converterTagLocaleFromString(String name)
Convert locale string used by converter tags to locale.
name
- name of the locale
- locale specified by the given String
org.apache.myfaces.taglib.core.ConvertDateTimeTag.setConverterLocale
, org.apache.myfaces.taglib.core.ConvertNumberTag.setConverterLocale
toLocale
public static Locale toLocale(String localeString)
Converts a locale string to Locale
class. Accepts both
'_' and '-' as separators for locale components.
localeString
- string representation of a locale
- Locale instance, compatible with the string representation