|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bankframe.localization.LocalizedMessageFormat
Adds a layer on top of the java.text.MessageFormat
class that
localizes individual arguments within the message.
Constructor Summary | |
LocalizedMessageFormat()
|
Method Summary | |
static java.lang.String |
format(java.lang.String pattern,
java.lang.Object[] arguments)
This method implements the same behavior as MessageFormat.format() but adds support for one additional qualifer: . |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LocalizedMessageFormat()
Method Detail |
public static java.lang.String format(java.lang.String pattern, java.lang.Object[] arguments)
MessageFormat.format()
but adds support for one additional qualifer: l8n
.
When this qualifier is specified as part of a pattern argument, the corresponding argument will be localized by searching the
messages file for a key of the same value as the specified argument.
For example if the following pattern is supplied:
Unable to find {0,l8n}
where argument zero is: RETAIL_ACCOUNT
this method
will attempt to localize argument zero by looking in the messages file for a key named RETAIL_ACCOUNT
and
substitute the corresponding localized value into the pattern, giving a result that should look like this:
Unable to find Retail Account
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |