Class Resources
java.lang.Object
org.apache.taglibs.standard.resources.Resources
Provides locale-neutral access to string resources. Only the documentation and code are in English. :-)
The major goal, aside from globalization, is convenience. Access to resources with no parameters is made in the form:
Resources.getMessage(MESSAGE_NAME);
Access to resources with one parameter works like
Resources.getMessage(MESSAGE_NAME, arg1);
... and so on.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetMessage(String name) Retrieves a message with no arguments.static StringgetMessage(String name, Object... a) Retrieves a message with arbitrarily many arguments.
-
Constructor Details
-
Resources
public Resources()
-
-
Method Details
-
getMessage
Retrieves a message with no arguments.- Parameters:
name- the name of the message- Returns:
- the localized message text
- Throws:
MissingResourceException- if the message does not exist
-
getMessage
Retrieves a message with arbitrarily many arguments.- Parameters:
name- the name of the messagea- arguments to be substituted into the message text- Returns:
- the localized message text
- Throws:
MissingResourceException- if the message does not exist
-