public class Localizer
extends java.lang.Object
Constructor and Description |
---|
Localizer() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getMsg(java.lang.String tagName)
Get the appropriate localized String corresponding to a ResourceBundle tag name in a
specific ResourceBundle.
|
static java.lang.String |
getMsg(java.lang.String bundleBaseName,
java.lang.String tagName)
Get the appropriate localized String corresponding to a ResourceBundle tag name in a
specific ResourceBundle.
|
static java.util.ResourceBundle |
getMsgBundle()
Get the appropriate locale-specific message bundle for YAAC.
|
static java.util.ResourceBundle |
getMsgBundle(java.lang.String altBundleName)
Get the appropriate locale-specific variant of some message bundle in one or more of the
provided plugins.
|
static java.lang.String |
getMsgNoException(java.lang.String tagName)
Get the appropriate localized String corresponding to a ResourceBundle tag name in a
specific ResourceBundle.
|
static void |
setContextClassLoader(java.lang.ClassLoader cl)
Update the ClassLoader hierarchy that will be used to look for
ResourceBundle property files.
|
public static void setContextClassLoader(java.lang.ClassLoader cl)
cl
- ClassLoader to be the most complete set availablepublic static java.util.ResourceBundle getMsgBundle()
public static java.util.ResourceBundle getMsgBundle(java.lang.String altBundleName)
altBundleName
- String base name of the ResourceBundle to search forpublic static java.lang.String getMsg(java.lang.String tagName) throws java.util.MissingResourceException
tagName
- String name to look upjava.util.MissingResourceException
- if the tag cannot be foundpublic static java.lang.String getMsgNoException(java.lang.String tagName) throws java.util.MissingResourceException
tagName
- String name to look upjava.util.MissingResourceException
- if the ResourceBundle cannot be foundpublic static java.lang.String getMsg(java.lang.String bundleBaseName, java.lang.String tagName) throws java.util.MissingResourceException
bundleBaseName
- String name of bundle containing the tagtagName
- String name to look upjava.util.MissingResourceException
- if the bundle or tag cannot be found