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