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

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -