Sorry, I didn't know what was Hermes. I've never used it, so I am not able to 
help.

Good luck.


Le 6 août 2014 à 10:39, Tom <[email protected]> a écrit :

> I did use ur code, but it didn't work as it still pick the default ID 
> (id=1245)
> 
> 
> On Wednesday, August 6, 2014 5:21:31 PM UTC+10, Fabien Dumay wrote:
> Hi Tom,
> 
> Did you think to enable the i18n permutations? 
> To to setup the german permutation, you have to add few lines in gwt module 
> file (.gwt.xml):
> 
>       <inherits name="com.google.gwt.i18n.I18N"/>
>       ...
>       <set-configuration-property name="locale.useragent" value="Y"/>
>       <set-configuration-property name="locale.searchorder" 
> value="queryparam,cookie,meta,useragent"/>
>       ...
>       <extend-property name="locale" values="en"/>
>       <extend-property name="locale" values="de"/>
>       <set-property-fallback name="locale" value="en"/> 
> 
> Hoping it helps.
> 
> Regards,
> 
> --
> Fabien
> http://pwt.putnami.org/
> 
> Le 6 août 2014 à 04:35, Tom <[email protected]> a écrit :
> 
>> Ok, I am building GWT app and I am using Hermes to manage the constants at 
>> Server side.
>> 
>> Here is what I did:
>> 
>> I created MyConstantsWithLookup.properties (default English version) & 
>> MyConstantsWithLookup_de.properties(German version) & 
>> MyConstantsWithLookup.java in client package
>> 
>> -MyConstantsWithLookup.properties has
>> 
>> id=1245
>> 
>> 
>> 
>> -MyConstantsWithLookup_de.properties has
>> 
>> id=4556 
>> 
>> -MyConstantsWithLookup.java
>> 
>> public interface MyConstantsWithLookup extends ConstantsWithLookup {
>>    int id();
>> }
>> There is Data.java in Server package. Data.java has
>> 
>> public static int id(){
>>     try {
>>         MyConstantsWithLookup myConstantsWithLookup = 
>> Hermes.get(MyConstantsWithLookup.class, "");
>>         return myConstantsWithLookup.id();
>>     } catch (IOException e) {
>>         // TODO Auto-generated catch block
>>         e.printStackTrace();
>>     }
>>     return "";
>> }
>> Ok, it works fine if i open the page in English. Ex, myDomain.com it will 
>> show correctly the id=1245. However, if i open the page in German language 
>> myDomain.com?locale=de then it did not pick up the id=4556 but still use the 
>> old id.
>> 
>> Did i do anything wrong here?
>> 
>> How to fix it?
>> 
>> http://stackoverflow.com/questions/25151383/how-to-let-hermes-to-switch-to-other-properties-file-rather-the-default-one
>> 
>> 
>> -- 
>> 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 [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at http://groups.google.com/group/google-web-toolkit.
>> For more options, visit https://groups.google.com/d/optout.
> 
> 
> -- 
> 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 [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to