public final class MessageLocalization extends Object
Modifier and Type | Method and Description |
---|---|
static String |
getComposedMessage(String key)
Get a message without parameters.
|
static String |
getComposedMessage(String key,
int p1)
Get a message with one parameter.
|
static String |
getComposedMessage(String key,
Object p1)
Get a message with one parameter.
|
static String |
getComposedMessage(String key,
Object p1,
Object p2)
Get a message with one parameter.
|
static String |
getComposedMessage(String key,
Object p1,
Object p2,
Object p3)
Get a message with one parameter.
|
static String |
getComposedMessage(String key,
Object p1,
Object p2,
Object p3,
Object p4)
Get a message with two parameters.
|
static String |
getMessage(String key)
Get a message without parameters.
|
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 messagepublic static String getComposedMessage(String key)
key
- the key to the messagepublic static String getComposedMessage(String key, Object p1)
key
- the key to the messagep1
- the parameterpublic static String getComposedMessage(String key, int p1)
key
- the key to the messagep1
- the parameterpublic static String getComposedMessage(String key, Object p1, Object p2)
key
- the key to the messagep1
- the parameterp2
- the parameterpublic static String getComposedMessage(String key, Object p1, Object p2, Object p3)
key
- the key to the messagep1
- the parameterp2
- the parameterp3
- the parameterpublic static String getComposedMessage(String key, Object p1, Object p2, Object p3, Object p4)
key
- the key to the messagep1
- the parameterp2
- the parameterp3
- the parameterp4
- the parameterpublic static boolean setLanguage(String language, String country) throws IOException
language
- the languagecountry
- the countryIOException
- on errorpublic static void setMessages(Reader r) throws IOException
r
- the ReaderIOException
- on errorCopyright © 2020. All rights reserved.