Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change default locale in GWT

Our application should be fixed to use eb-GB locale. For now I've added:

<extend-property name="locale" values="en_GB"/>

But this means that GWT builds premutations for both. How to setup GWT to eb-GB by default? Or how to remove default from compilation?

like image 439
Mike Chaliy Avatar asked Jan 21 '10 14:01

Mike Chaliy


3 Answers

<extend-property name="locale" values="sl_SI"/>
<set-property name="locale" value="sl_SI" />

first adds to the set of available locales.

then sets the default.

if default is not set to the same locale as the added ones, gwt will build permutations for added locale and default locale.

like image 93
Jernej Avatar answered Nov 04 '22 06:11

Jernej


How about:

<set-property name="locale" value="en_GB" />
like image 24
David Nouls Avatar answered Nov 04 '22 08:11

David Nouls


I'm playing the archeologist here but according to GWT docs about internationalization you should use the property fallback for "locale" instead of forcing the locale itself.

So in your module XML (the .gwt.xml file) you should have :

<!-- Let say you app supports the english language, independent of country -->
<extend-property name="locale" values="en"/>
<!-- Now set the fallback locale so your app will be in british english by default, Sir -->
<set-property-fallback name="locale" value="en_GB"/>

<set-property name="locale" value="en_GB"/> will only set en_GB as the locale of your application and won't create the permutation for the other locales you defined.

Hope this helps.

like image 8
Kyone Avatar answered Nov 04 '22 08:11

Kyone