public final class MessageLocalization
extends java.lang.Object
Modifier and Type | Method | Description |
---|---|---|
static java.lang.String |
getComposedMessage(java.lang.String key,
int p1) |
Get a message with one parameter as an primitive int.
|
static java.lang.String |
getComposedMessage(java.lang.String key,
java.lang.Object... param) |
Get a message with param.length parameters or none if param is null.
|
static java.lang.String |
getMessage(java.lang.String key) |
Get a message without parameters.
|
static java.lang.String |
getMessage(java.lang.String key,
boolean useDefaultLanguageIfMessageNotFound) |
|
static boolean |
setLanguage(java.lang.String language,
java.lang.String country) |
Sets the language to be used globally for the error messages.
|
static void |
setMessages(java.io.Reader r) |
Sets the error messages directly from a Reader.
|
public static java.lang.String getMessage(java.lang.String key)
key
- the key to the messagepublic static java.lang.String getMessage(java.lang.String key, boolean useDefaultLanguageIfMessageNotFound)
public static java.lang.String getComposedMessage(java.lang.String key, int p1)
key
- the key to the messagep1
- the parameterpublic static java.lang.String getComposedMessage(java.lang.String key, java.lang.Object... param)
key
- the key to the messageparam
- array of parameter objects, (toString is used to add it to the message)public static boolean setLanguage(java.lang.String language, java.lang.String country) throws java.io.IOException
language
- the languagecountry
- the countryjava.io.IOException
- on errorpublic static void setMessages(java.io.Reader r) throws java.io.IOException
r
- the Readerjava.io.IOException
- on errorCopyright © 1998–2018. All rights reserved.