Tuesday, June 16, 2015

Re: I18N- sharing Constants

GWT will not create the CommonLabels_fr.properties, but if you create it, it will be used by LogingLabels_fr, isn't it? You can force ComonLabels_fr.java creation adding GWT.create(CommonLabels.class) in your code (not recommended). You can see why and how localizable resources are generated here https://github.com/gwtproject/gwt/blob/master/user/src/com/google/gwt/i18n/rebind/LocalizableGenerator.java.

Althought, you should see this http://dev.arcbees.com/gwtp/advancedfeatures/Merge-Locale.html.

On Tuesday, June 16, 2015 at 8:59:39 PM UTC+2, Tushar Bhasme wrote:
Correction:
I am getting the behavior I wanted for LoginLabels.java such that LoginLabels_fr extends CommonLabels_fr by default. It works as I intended.
But I still don't know why it is not generating a CommonLabels_fr.java

Thanks,
Tushar

On Wednesday, June 17, 2015 at 12:25:00 AM UTC+5:30, Tushar Bhasme wrote:
In my app, I have created an interface 
CommonLabels extends Constants
As name suggests, it contains all the labels that can be user on any page. There are some pages that use this interface directly.
I have created other interfaces (eg LoginLabels) for each page that extend this interface adding their own labels.

I now want to internationalize my app and created *_fr.properties file for each interface. I then found out that GWT does not create CommonLabels_fr.java but does create LoginLabels_fr.java. How do I make it work so that GWT generates a CommonLabels_fr.java, and LoginLabels.java such that LoginLabels_fr extends CommonLabels_fr

Thanks,
Tushar

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment