|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.lowagie.text.error_messages.MessageLocalization
public final class MessageLocalization
Localizes error messages. The messages are located in the package com.lowagie.text.error_messages in the form language_country.lng. The internal file encoding is UTF-8 without any escape chars, it's not a normal property file. See en.lng for more information on the internal format.
| Field Summary | |
|---|---|
private static String |
BASE_PATH
|
private static HashMap |
currentLanguage
|
private static HashMap |
defaultLanguage
|
| Constructor Summary | |
|---|---|
private |
MessageLocalization()
|
| Method Summary | |
|---|---|
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. |
private static HashMap |
getLanguageMessages(String language,
String country)
|
static String |
getMessage(String key)
Get a message without parameters. |
private static HashMap |
readLanguageStream(InputStream is)
|
private static HashMap |
readLanguageStream(Reader r)
|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static HashMap defaultLanguage
private static HashMap currentLanguage
private static final String BASE_PATH
| Constructor Detail |
|---|
private MessageLocalization()
| Method Detail |
|---|
public static String getMessage(String key)
key - the key to the message
public static String getComposedMessage(String key)
key - the key to the message
public static String getComposedMessage(String key,
Object p1)
key - the key to the messagep1 - the parameter
public static String getComposedMessage(String key,
int p1)
key - the key to the messagep1 - the parameter
public static String getComposedMessage(String key,
Object p1,
Object p2)
key - the key to the messagep1 - the parameterp2 - the parameter
public static String getComposedMessage(String key,
Object p1,
Object p2,
Object p3)
key - the key to the messagep1 - the parameterp2 - the parameterp3 - the parameter
public 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 parameter
public static boolean setLanguage(String language,
String country)
throws IOException
language - the languagecountry - the country
IOException - on error
public static void setMessages(Reader r)
throws IOException
r - the Reader
IOException - on error
private static HashMap getLanguageMessages(String language,
String country)
throws IOException
IOException
private static HashMap readLanguageStream(InputStream is)
throws IOException
IOException
private static HashMap readLanguageStream(Reader r)
throws IOException
IOException
|
Hosted by Hostbasket | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||