1
votes

I'm tring to enable i18n for the GWT application. The UI forms in this applications are described with ui.xml files (with UIBinder). I read this manual http://code.google.com/intl/ru-RU/webtoolkit/doc/latest/DevGuideUiBinderI18n.html and was able to process simple cases such as < span >text< /span> which was used as plain html. But I can't deside what shall I do with widget argmuments, i.e. < g:button text="Save" /> Manual supposes to insert

<ui:attribute name="text" description="Save"/>
<ui:msg description="Save">Сохранить</ui:msg>

inside the widget tag.

It's acceptable for button widget, but is not acceptable for custom widget which is implements HasOneWidget interface. When I'm trying to paste and inside such widget, I got a compile error, when compiler sees more than one child inside the widget tag. Is there any way to translate widget tag attributes in proper manner?

As a work-around I can pass ID instead of real text as an attribute, then call some Messages.resolveById("save") which will return "Сохранить", but it's requires much more changes & work than it was expected.

1

1 Answers

1
votes

Finally I found the solution: use < ui:with > tag to specify a Message class, than just insert {} in attributes.