public class I18nHelper extends Object
I18n.t(String, Object...) method on some attributes.
Make sure to set an i18nable compiler to have his CompilerConfiguration.isI18nable() returning true.| Modifier and Type | Field and Description |
|---|---|
static List<String> |
I18N_ATTRIBUTES |
protected static org.apache.commons.logging.Log |
log |
| Constructor and Description |
|---|
I18nHelper() |
| Modifier and Type | Method and Description |
|---|---|
static String |
addI18nInvocation(String widgetId,
String attributeName,
String attributeValueCode,
JAXXCompiler compiler)
Add the i18n on a attribute.
|
static String |
addI18nMnemonicInvocation(CompiledObject object,
String attributeName,
String attributeValueCode,
JAXXCompiler compiler)
Box a i18n key with code to be used as a i18n mnemonic.
|
static boolean |
isI18nableAttribute(String attributeName,
JAXXCompiler compiler)
Test if we have an active i18n attribute (says an i18n attribute on a i18neable compiler).
|
static boolean |
isI18nAttribute(String attributeName)
Test if we have an i18n attribute.
|
public static boolean isI18nableAttribute(String attributeName, JAXXCompiler compiler)
attributeName - name of attribute to testcompiler - current used compiler (contains options)true if wa have an active i18n attribute, false otherwise.public static boolean isI18nAttribute(String attributeName)
attributeName - name of attribute to testtrue if wa have an active i18n attribute, false otherwise.public static String addI18nInvocation(String widgetId, String attributeName, String attributeValueCode, JAXXCompiler compiler)
isI18nableAttribute(String, JAXXCompiler) returns
true
widgetId - the id of the widgetattributeName - the name of the attributeattributeValueCode - the value code of the attribute valuecompiler - the current used compilepublic static String addI18nMnemonicInvocation(CompiledObject object, String attributeName, String attributeValueCode, JAXXCompiler compiler)
object - the object to useattributeName - the name of the attributeattributeValueCode - the value code of the attribute valuecompiler - the current used compileCopyright © 2008–2014 CodeLutin. All rights reserved.