public class ResourceBundleUtils extends Object
Utility to get resource bundle from either HST ResourceBundleRegistry or Java Standard Resource Bundles.
Modifier and Type | Method and Description |
---|---|
static ResourceBundle |
getBundle(javax.servlet.http.HttpServletRequest servletRequest,
String basename,
Locale locale)
Returns resource bundle based on the specified basename and locale.
|
static ResourceBundle |
getBundle(javax.servlet.http.HttpServletRequest servletRequest,
String basename,
Locale locale,
boolean fallbackToJavaResourceBundle)
Returns resource bundle based on the specified basename and locale.
|
public static ResourceBundle getBundle(javax.servlet.http.HttpServletRequest servletRequest, String basename, Locale locale)
servletRequest
- basename
- locale
- NullPointerException
- - if baseName is nullMissingResourceException
- - if no Java standard resource bundle for the specified base name can be foundpublic static ResourceBundle getBundle(javax.servlet.http.HttpServletRequest servletRequest, String basename, Locale locale, boolean fallbackToJavaResourceBundle)
servletRequest
- basename
- locale
- fallbackToJavaResourceBundle
- NullPointerException
- - if baseName is nullMissingResourceException
- - if no Java standard resource bundle for the specified base name can be foundCopyright © 2008-2013 Hippo B.V. (http://www.onehippo.com). All Rights Reserved.