|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttriploa.LocalizationSupport
public class LocalizationSupport
Constructor Summary | |
---|---|
LocalizationSupport()
|
Method Summary | |
---|---|
static java.lang.String |
getErrorMessage()
Returns an error message if there was any problem with accessing the localized text. |
static java.lang.String |
getMessage(java.lang.String key)
Finds a localized string in a message bundle. |
static java.lang.String |
getMessage(java.lang.String key,
java.lang.Object[] args)
Finds a localized string in a message bundle and formats the message by passing requested parameters. |
static boolean |
initLocalizationSupport()
Initializes localization support based on currently set locale (obtained from "microedition.locale" system property). |
static boolean |
initLocalizationSupport(java.lang.String locale)
Explicit initialization of the localization support. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LocalizationSupport()
Method Detail |
---|
public static boolean initLocalizationSupport()
getMessage(java.lang.String)
method is attempted for the first time.
You can call this method explicitly to see whether there was any problem
with initialization of the localization support. Method returns a status
of the successfulness. If there was any problem with initialization, you can
get reason by using getErrorMessage()
method.
public static boolean initLocalizationSupport(java.lang.String locale)
messages_fr.properties
files is available), you should initialize the localization support (by calling
initLocalizationSupport("fr");
) before using getMessage(java.lang.String)
method for the first
time.
Method returns a status of the successfulness. If there was any problem with
the initialization, you can get explanation by using getErrorMessage()
method.
locale
- locale which will be used to determine which message file from bundle will be used
public static java.lang.String getErrorMessage()
_INIT_LOCALIZATION_ERROR_MSG
.
public static final java.lang.String getMessage(java.lang.String key)
key
- key of the localized string to look for
_DEFAULT_STRING
string
is returnedpublic static final java.lang.String getMessage(java.lang.String key, java.lang.Object[] args)
key
- key of the localized string to look forargs
- array of parameters to use for formatting the message
_DEFAULT_STRING
string
is returned
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |