gwt - How to internationalize the text attribute of a TreeItem in UIBinder? -
given uibinder tree this:
<g:tree ...> <g:treeitem text='links1' > <g:hyperlink ... /> <g:hyperlink ... /> <g:treeitem text='links2' > <g:hyperlink ... /> <g:hyperlink ... /> </g:tree> how internationalize 'text' attribute of treeitem elements (without resorting doing programmatically)?
if have messages (or constants) interface can follows: add ui:with resource to uibinder xml:
<ui:with field='i18n' type="com.example.myapp.client.i18n.mymessages" /> next use follows:
<g:tree ...> <g:treeitem text='{i18n.links1}' > <g:hyperlink ... /> <g:hyperlink ... /> <g:treeitem text='{i18n.links2}' > <g:hyperlink ... /> <g:hyperlink ... /> </g:tree> where links1 , links2 refer method names on mymessages interface.
Comments
Post a Comment