|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.magicproject.ui.i18n.LanguageManager
public final class LanguageManager
LanguageManager.java Created on 23 janv. 2004
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_LANGUAGE
The default language used is case of error or undefined message if the user language |
static java.lang.String |
LANGUAGE_EXTENSION
The language extension |
static java.util.Set<Language> |
languages
Represents the available languages and their specifications |
static java.lang.String |
LOCALE_LANGUAGE
The locale language. |
static java.lang.String |
PATH_ROOT
The root directory where resourcebundles are located. |
Method Summary | |
---|---|
static Language |
getLanguage()
Return the current language name. |
static java.lang.String |
getNullString(java.lang.String key)
Return the localised message. |
static java.util.ResourceBundle |
getPrimaryBundle(java.lang.String root)
Return a bundle corresponding to the specified language in the root. |
static java.util.ResourceBundle |
getSecondaryBundle(java.lang.String root)
Return resource bundle used if the main one did not contain a message in the user language |
static java.lang.String |
getString(java.lang.String key)
return the localised message. |
static java.lang.String |
getString(java.lang.String key,
java.lang.Object... parameters)
|
static void |
initLanguageManager(java.lang.String languageName)
Load the preferred language, and set the language field |
static void |
setLanguage(java.lang.String languageName)
Set the language to use. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PATH_ROOT
public static final java.lang.String DEFAULT_LANGUAGE
public static final java.lang.String LOCALE_LANGUAGE
public static final java.lang.String LANGUAGE_EXTENSION
public static java.util.Set<Language> languages
Method Detail |
---|
public static Language getLanguage()
public static void initLanguageManager(java.lang.String languageName)
languageName
- the language name to use.public static java.util.ResourceBundle getPrimaryBundle(java.lang.String root)
root
- directory where the looked for bundle is located.
public static java.util.ResourceBundle getSecondaryBundle(java.lang.String root)
root
- directory where the looked for bundle is located.
public static java.lang.String getString(java.lang.String key)
key
- the message key.
public static java.lang.String getNullString(java.lang.String key)
key
- the message key.
null
if the key
has not been found.public static java.lang.String getString(java.lang.String key, java.lang.Object... parameters)
key
- the message key.parameters
- the parameters to add to resourceBudle.
public static void setLanguage(java.lang.String languageName)
languageName
- the new language to use
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |