Given a UIBinder tree like this:
<g:Tree ...>
<g:TreeItem text='Links1' >
<g:Hyperlink ... />
<g:Hyperlink ... />
<g:TreeItem text='Links2' >
<g:Hyperlink ... />
<g:Hyperlink ... />
</g:Tree>
How to internationalize the ‘text’ attribute of TreeItem elements (without resorting to doing it programmatically)?
If you already have a Messages (or Constants) interface you can do it as follows:
Add a
ui:withresource to to UiBinder xml:Next use it as follows:
Where
links1andlinks2refer to method names on yourMyMessagesinterface.