JavaScud | Forum | JIRA | Blog |
  Dashboard > WebWork2文档中文化计划 > ... > FAQ > How do I add I18N to a UI tag, like the textfield tag
  WebWork2文档中文化计划 Log In View a printable version of the current page.  
  How do I add I18N to a UI tag, like the textfield tag
Added by scud, last edited by scud on Mar 30, 2006  (view change)
Labels: 
(None)

<ww:textfield label="%{getText('i18n.label')}" name="label1" />

This will get the localized text message for the key "i18n.key" and put it in the label.

Alternatively, portion of controlheader-core.ftl in /template/xhtml could be modified (if xhtml theme is being used), as follows :-

${parameters.label?html}:<#t/>
<#assign mm="getText('"+parameters.label?html+"')" /><#t/>
${stack.findValue(mm)}:<#t/>

or

${stack.findValue("getText('"+parameters.label?html+"')")}

such that using text tag like following will work as well (such that the label printed will be i18n).

<ww:textfield label="i18n.label" name="label1" />
Site running on a free Atlassian Confluence Open Source Project License granted to WebWork China. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.3 Build:#808 May 29, 2007) - Bug/feature request - Contact Administrators