|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmondrian.gui.I18n
public class I18n
Constructor Summary | |
---|---|
I18n(ResourceBundle guiBundle,
ResourceBundle languageBundle)
|
Method Summary | |
---|---|
static void |
addOnLanguageChangedListener(LanguageChangedListener listener)
|
Locale |
getCurrentLocale()
|
static String |
getCurrentLocaleID()
|
String |
getFormattedString(String stringId,
String defaultValue,
Object... args)
Retrieves a resource string using the current locale. |
String |
getGUIReference(String reference)
|
static List<Locale> |
getListOfAvailableLanguages(Class cl)
|
static Set<String> |
getResourcesInPackage(Class coreClass,
String packageName)
Enumerates the resouces in a give package name. |
String |
getString(String stringId)
Retreives a resource string using the current locale. |
String |
getString(String stringId,
Locale currentLocale,
String defaultValue)
Retreive a resource string using the given locale. |
String |
getString(String stringId,
String defaultValue)
Retreives a resource string using the current locale, with a default. |
void |
setCurrentLocale(Locale locale)
|
void |
setCurrentLocale(String language)
|
void |
setCurrentLocale(String language,
String country)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public I18n(ResourceBundle guiBundle, ResourceBundle languageBundle)
Method Detail |
---|
public static void addOnLanguageChangedListener(LanguageChangedListener listener)
public static List<Locale> getListOfAvailableLanguages(Class cl)
public static Set<String> getResourcesInPackage(Class coreClass, String packageName) throws IOException
The resulting set is deterministically ordered.
coreClass
- Class for class loader to find the resourcespackageName
- The package to enumerate
IOException
public void setCurrentLocale(String language)
public void setCurrentLocale(String language, String country)
public void setCurrentLocale(Locale locale)
public Locale getCurrentLocale()
public String getGUIReference(String reference)
public String getString(String stringId)
stringId
- The resource string identifier
public String getString(String stringId, String defaultValue)
stringId
- The resource string identifierdefaultValue
- If no resource for the stringID is specified, use
this default value
public String getFormattedString(String stringId, String defaultValue, Object... args)
stringId
- The resource string identifierdefaultValue
- The default value for the resource stringargs
- arguments to be inserted into the resource string
public String getString(String stringId, Locale currentLocale, String defaultValue)
stringId
- The resource string identifiercurrentLocale
- required Locale for resourcedefaultValue
- The default value for the resource string
public static String getCurrentLocaleID()
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |