|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jetrix.Language
public class Language
Helper class to handle and retrieve localized strings.
Method Summary | |
---|---|
static Language |
getInstance()
Return the unique instance of this class. |
static Collection<Locale> |
getLocales()
Return the list of languages supported by the server. |
ResourceBundle |
getResourceBundle(Locale locale)
Return the ResourceBundle for the specified locale. |
static String |
getText(String key,
Locale locale)
Return the specified localized text for a given locale. |
static String |
getText(String key,
Locale locale,
Object... arguments)
Return the specified localized text for a given locale and replace the parameters with an array of arguments. |
static boolean |
isSupported(Locale locale)
Tell if the specified locale has a corresponding resource file available. |
ResourceBundle |
load(Locale locale)
Load and return the ResourceBundle for the specified locale. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Language getInstance()
public ResourceBundle load(Locale locale)
locale
- the locale of the returned bundle if availablepublic ResourceBundle getResourceBundle(Locale locale)
locale
- the locale of the bundle to returnpublic static boolean isSupported(Locale locale)
locale
- the locale to test
public static Collection<Locale> getLocales()
public static String getText(String key, Locale locale)
key
- the text key in the resource bundlelocale
- the locale of the messagepublic static String getText(String key, Locale locale, Object... arguments)
key
- the text key in the resource bundlelocale
- the locale of the messagearguments
- the array of arguments
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |