|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.geeboss.view.i18n.I18nUtil
public class I18nUtil
Utility methods for i18n support
Field Summary | |
---|---|
static java.util.Locale |
DEFAULT_LANGUAGE
Default language |
static java.util.List<java.lang.String> |
LANGUAGE_LIST
Available language list |
static java.util.Locale[] |
LANGUAGES
Available languages |
Constructor Summary | |
---|---|
I18nUtil()
|
Method Summary | |
---|---|
static java.lang.String |
formatString(java.lang.String aFormat,
java.lang.Object[] aParams)
Format a given string |
static java.util.ResourceBundle |
getGeebossBundle(java.util.Locale locale)
Get the Geeboss message bundle for the specified locale |
static java.lang.String |
getI18nString(java.lang.String key)
Get a translated string for the default locale |
static java.lang.String |
getI18nString(java.lang.String key,
java.util.Locale locale)
Get a translated string for a given locale |
static java.lang.String |
getI18nString(java.lang.String key,
java.lang.Object[] parameters)
Get a translated string for a set of parametersa and the default locale |
static java.lang.String |
getI18nString(java.lang.String key,
java.lang.Object[] parameters,
java.util.Locale locale)
Get a translated string for a set of parametersa and given locale |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.util.Locale[] LANGUAGES
public static java.util.List<java.lang.String> LANGUAGE_LIST
public static java.util.Locale DEFAULT_LANGUAGE
Constructor Detail |
---|
public I18nUtil()
Method Detail |
---|
public static java.util.ResourceBundle getGeebossBundle(java.util.Locale locale)
locale
- the locale we want the bundle for
public static java.lang.String getI18nString(java.lang.String key, java.util.Locale locale)
key
- the string keylocale
- the locale
public static java.lang.String getI18nString(java.lang.String key, java.lang.Object[] parameters, java.util.Locale locale)
key
- the string keyparameters
- the parameters to use to format the stringlocale
- the locale
public static java.lang.String getI18nString(java.lang.String key)
key
- the string key
public static java.lang.String getI18nString(java.lang.String key, java.lang.Object[] parameters)
key
- the string keyparameters
- the parameters to use to format the string
public static java.lang.String formatString(java.lang.String aFormat, java.lang.Object[] aParams)
aFormat
- the format stringaParams
- the parameters
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |