jaxx.compiler
Class I18nHelper
java.lang.Object
jaxx.compiler.I18nHelper
public class I18nHelper
- extends java.lang.Object
I18n methods to add org.nuiton.i18n.I18n#_(java.lang.String, java.lang.Object[]) method on some attributes.
Make sure to set an i18nable compiler to have his CompilerConfiguration.isI18nable() returning true.
- Author:
- chemit
|
Field Summary |
static java.util.List<java.lang.String> |
I18N_ATTRIBUTES
|
protected static org.apache.commons.logging.Log |
log
|
|
Method Summary |
static java.lang.String |
addI18nInvocation(java.lang.String widgetId,
java.lang.String attributeName,
java.lang.String attributeValueCode,
JAXXCompiler compiler)
Add the i18n on a attribute. |
static boolean |
isI18nableAttribute(java.lang.String attributeName,
JAXXCompiler compiler)
Test if we have an active i18n attribute (says an i18n attribute on a i18neable compiler). |
static boolean |
isI18nAttribute(java.lang.String attributeName)
Test if we have an i18n attribute. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static final org.apache.commons.logging.Log log
I18N_ATTRIBUTES
public static final java.util.List<java.lang.String> I18N_ATTRIBUTES
I18nHelper
public I18nHelper()
isI18nableAttribute
public static boolean isI18nableAttribute(java.lang.String attributeName,
JAXXCompiler compiler)
- Test if we have an active i18n attribute (says an i18n attribute on a i18neable compiler).
- Parameters:
attributeName - name of attribute to testcompiler - current used compiler (contains options)
- Returns:
true if wa have an active i18n attribute, false otherwise.
isI18nAttribute
public static boolean isI18nAttribute(java.lang.String attributeName)
- Test if we have an i18n attribute.
- Parameters:
attributeName - name of attribute to test
- Returns:
true if wa have an active i18n attribute, false otherwise.
addI18nInvocation
public static java.lang.String addI18nInvocation(java.lang.String widgetId,
java.lang.String attributeName,
java.lang.String attributeValueCode,
JAXXCompiler compiler)
- Add the i18n on a attribute.
Note: Be ware : no test is done here to ensure we are on a i18neable attribute for an i18nable compiler.
Make sure with the method
isI18nableAttribute(String, JAXXCompiler) returns
true
- Parameters:
widgetId - the id of the widgetattributeName - the name of the attributeattributeValueCode - the value code of the attribute valuecompiler - the current used compile
- Returns:
- the surrender i18n call if attribute name is matchrf the attributeValueCode otherwise
Copyright © 2008-2010 CodeLutin. All Rights Reserved.