Does localization of a GWT application built with UiBinder work in host mode? This is not for me. Here is what I did:
1) Added locale properties to the GWT XML module
< inherits name="com.google.gwt.i18n.I18N" / > < extend-property name='locale' values='en'/> < extend-property name='locale' values='ru'/> < set-property-fallback name="locale" value="en"/>
2) Notified messages in * .ui.xml files with
< ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" ui:generateFormat="com.google.gwt.i18n.rebind.format.PropertiesFormat" ui:generateKeys="com.google.gwt.i18n.rebind.keygen.MD5KeyGenerator" ui:generateLocales="default" xmlns:g="urn:import:com.google.gwt.user.client.ui"> < g:HTMLPanel> < ui:msg description="Hello Description">Hello!< /ui:msg> < /g:HTMLPanel> < /ui:UiBinder>
3) Added compiler option GWT -extra
4) Compiled the project. Found files with the suffix .GenMessages.properties in the additional folder.
5) Localized generated messages. I copied each .GenMessages.properties file to the same folder with the corresponding .ui.xml file. Renamed it with my locale in the file name, for example. .GenMessages_en.properties .GenMessages_en.properties
6) Compiled the project.
7) Launched the application and changed the locale variable in the URL to check, for example http://127.0.0.1:8888/TestLocale.html?gwt.codesvr=127.0.0.1:9997&locale=en
It still shows me the default English version of resources.
What am I missing? How can I debug it? There is nothing in the magazines or the output.
I'm on Windows using IntelliJ IDEA and Chrome as a browser.
Thanks!
Update: This did not work because I had an additional < set-property name="locale" value="en"/ > in the config module :( Perhaps these were overriding values ββfrom the extend-property tag.
I wrote a step-by-step description of how to make it work here if anyone is interested.