| Constructor and Description |
|---|
I18nUtil() |
| Modifier and Type | Method and Description |
|---|---|
static String |
getI18nKey(Enum<?> enumX)
Returns the i18n key for the enum and its literal.
|
static String |
getI18nKey(String enumName,
Enum<?> literal)
Returns the i18n key for the enum and its literal.
|
static String |
getImageI18nKey(String enumName,
Enum<?> literal)
Returns the i18nImageKey for the Enum name and literal.
|
static String |
getImageKey(String i18nLabelKey)
Returns the image key for the given label key.
|
static String |
translateBoolean(II18nService i18nService,
Boolean value,
Locale locale)
Formats the boolean value.
|
static String |
translateEnum(II18nService i18nService,
Object value,
Locale locale)
Formats the enum literal.
|
static String |
translateNumber(II18nService i18nService,
Number number,
Locale locale)
Translates number values to their locale representation.
|
public I18nUtil()
public static String translateEnum(II18nService i18nService, Object value, Locale locale)
i18nService - the i18n servicevalue - the valuelocale - the localepublic static String translateBoolean(II18nService i18nService, Boolean value, Locale locale)
i18nService - the i18n servicevalue - the valuelocale - the localepublic static String getI18nKey(String enumName, Enum<?> literal)
enumName - the enum nameliteral - the literalpublic static String getI18nKey(Enum<?> enumX)
enumX - the enum xpublic static String getImageI18nKey(String enumName, Enum<?> literal)
enumName - the enum nameliteral - the literalpublic static String getImageKey(String i18nLabelKey)
i18nLabelKey - the i18n label keypublic static String translateNumber(II18nService i18nService, Number number, Locale locale)
i18nService - the i18n servicenumber - the numberlocale - the localeCopyright © 2013-2016 Loetz GmbH&Co.KG - Heidelberg - Germany, Eclipse OSBP Project, OS.bee