|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectwicket.Localizer
Utility class that encapsulates all of the localization related functionality
in a way that is can be accessed by all areas of the framework in a
consistent way. A singleton instance of this class is available via the
Application object.
Application.getLocalizer()| Constructor Summary | |
Localizer(Application application)
Create the utils instance class backed by the configuration information contained within the supplied settings object. |
|
| Method Summary | |
java.lang.String |
getString(java.lang.String key,
Component component)
|
java.lang.String |
getString(java.lang.String key,
Component component,
IModel model)
|
java.lang.String |
getString(java.lang.String key,
Component component,
IModel model,
java.util.Locale locale,
java.lang.String style,
java.lang.String defaultValue)
Get the localized string using all of the supplied parameters. |
java.lang.String |
getString(java.lang.String key,
Component component,
IModel model,
java.lang.String defaultValue)
Get the localized string for the given component. |
java.lang.String |
getString(java.lang.String key,
Component component,
java.lang.String defaultValue)
Get the localized string for the given component. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Localizer(Application application)
application - The application to localize for| Method Detail |
public java.lang.String getString(java.lang.String key,
Component component)
throws java.util.MissingResourceException
key - The key to obtain the resource forcomponent - The component to get the resource for (optional)
java.util.MissingResourceException - If resource not found and configuration dictates that
exception should be throwngetString(String, Component, String)
public java.lang.String getString(java.lang.String key,
Component component,
IModel model)
throws java.util.MissingResourceException
key - The key to obtain the resource forcomponent - The component to get the resource for (optional)model - The model to use for OGNL substitutions in the strings
(optional)
java.util.MissingResourceException - If resource not found and configuration dictates that
exception should be throwngetString(String, Component, IModel, String)
public java.lang.String getString(java.lang.String key,
Component component,
IModel model,
java.util.Locale locale,
java.lang.String style,
java.lang.String defaultValue)
throws java.util.MissingResourceException
key - The key to obtain the resource forcomponent - The component to get the resource for (optional)model - The model to use for OGNL substitutions in the strings
(optional)locale - The locale to get the resource for (optional)style - The style to get the resource for (optional) (see Session)defaultValue - The default value (optional)
java.util.MissingResourceException - If resource not found and configuration dictates that
exception should be thrown
public java.lang.String getString(java.lang.String key,
Component component,
IModel model,
java.lang.String defaultValue)
throws java.util.MissingResourceException
key - The key to obtain the resource forcomponent - The component to get the resource for (optional)model - The model to use for OGNL substitutions in the strings
(optional)defaultValue - The default value (optional)
java.util.MissingResourceException - If resource not found and configuration dictates that
exception should be thrown
public java.lang.String getString(java.lang.String key,
Component component,
java.lang.String defaultValue)
throws java.util.MissingResourceException
key - The key to obtain the resource forcomponent - The component to get the resource for (optional)defaultValue - The default value (optional)
java.util.MissingResourceException - If resource not found and configuration dictates that
exception should be thrown
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||