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

php - How can I edit my code to echo the data of child's element where my search term was found in, in XMLReader? -

javascript - Iterate over array and calculate average values of array-parts -

jQuery Ajax Render Fragments OR Whole Page -