|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.joda.time.contrib.jsptag.Util
Utilities in support of tag-handler classes.
Constructor Summary | |
Util()
|
Method Summary | |
static LocalizationContext |
getLocalizationContext(PageContext pc)
Gets the default I18N localization context. |
static LocalizationContext |
getLocalizationContext(PageContext pc,
String basename)
Gets the resource bundle with the given base name, whose locale is determined as follows: Check if a match exists between the ordered set of preferred locales and the available locales, for the given base name. |
static Enumeration |
getRequestLocales(HttpServletRequest request)
HttpServletRequest.getLocales() returns the server's default locale if the request did not specify a preferred language. |
static int |
getScope(String scope)
Converts the given string description of a scope to the corresponding PageContext constant. |
static Locale |
parseLocale(String locale)
See parseLocale(String, String) for details. |
static Locale |
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. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Util()
Method Detail |
public static int getScope(String scope)
scope
- String description of scope
public static Enumeration getRequestLocales(HttpServletRequest request)
public static Locale parseLocale(String locale)
public static Locale parseLocale(String locale, String variant)
locale
- the locale string to parsevariant
- the variant
IllegalArgumentException
- if the given locale does not have a
language component or has an empty country componentpublic static LocalizationContext getLocalizationContext(PageContext pc)
pc
- Page in which to look up the default I18N localization contextpublic static LocalizationContext getLocalizationContext(PageContext pc, String basename)
If no match was found in the previous step, check if a match exists between the fallback locale (given by the javax.servlet.jsp.jstl.fmt.fallbackLocale configuration setting) and the available locales, for the given base name.
pc
- Page in which the resource bundle with the given base
name is requestedbasename
- Resource bundle base name
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |