org.jboss.errai.ui.shared
Class TemplateTranslationVisitor
java.lang.Object
org.jboss.errai.ui.shared.TemplateVisitor
org.jboss.errai.ui.shared.TemplateTranslationVisitor
- All Implemented Interfaces:
- DomVisitor
public class TemplateTranslationVisitor
- extends TemplateVisitor
Visits the DOM and translates i18n text.
- Author:
- Lincoln Baxter, III, Max Barkley
Method Summary |
protected void |
visitAttribute(String i18nKeyPrefix,
Element element,
String attributeName)
Translate the text value in an attribute of this element if there is i18n text. |
protected void |
visitElement(String i18nKeyPrefix,
Element element)
Translate the text in this element if there is i18n text. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TemplateTranslationVisitor
public TemplateTranslationVisitor(String i18nPrefix)
visitElement
protected void visitElement(String i18nKeyPrefix,
Element element)
- Translate the text in this element if there is i18n text.
- Overrides:
visitElement
in class TemplateVisitor
- Parameters:
i18nKeyPrefix
- The template prefix for the i18n keyelement
- The element to be translated
visitAttribute
protected void visitAttribute(String i18nKeyPrefix,
Element element,
String attributeName)
- Translate the text value in an attribute of this element if there is i18n text.
- Overrides:
visitAttribute
in class TemplateVisitor
- Parameters:
i18nKeyPrefix
- The template prefix for the i18n keyelement
- The element containing the attribute to be translatedattributeName
- The name of the attribute to be translated
Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.