Indeed, it seems to work as you think it does. I just tried removing
the _default.properties file and thing still work. Was that
@DefaultLocal("en") all that was lacking to begin with? I'm not even
using the set-property-fallback.

Thanks for sharing! I was beginning to dispare.

/PEZ

On Jun 11, 3:05 pm, Thomas Broyer <[email protected]> wrote:
> On 11 juin, 11:05, PEZ <[email protected]> wrote:
>
>
>
>
>
> > Finally got some traction thanks to the clues I got from Federico
> > Kerek, author of Essential GWT 
> > -http://my.safaribooksonline.com/9780321705631
>
> > It seems like it is something I don't understand with the default
> > locale mechanism. I haven't figured it out, but it seems that to get
> > plural handling to work I need:
>
> > - In my module's gwt.xml file:
> >   <extend-property name="locale" values="en"/>
> > - In my Messages extentsion:
> > @DefaultLocale("en")
> > public interface MyMessages extends Messages ...
> > - Explicitly load the "en" locale by appending to the URL
> > &locale=en
>
> > Does this provide enough clues for anyone to see where I might be
> > doing this wrong?
>
> Have you tried adding <set-property-fallback name="locale" value="en" />? it 
> should make the "default" locale (i.e. when no locale is
>
> "explicitly loaded") map to the "en" locale, so you don't need the
> &locale=en thing (or <meta name='gwt:property' content='locale=en'>)
> You'd still have to <extend-property> and @DefaultLocale though.
>
> AFAICT, @DefaultLocale tells GWT what locale the @DefaultMessage (or
> similar annotations for Constants) are written into. If you don't use
> it, it'll consider your Messages interface to be in the "default"
> locale, which has no associated "plural rule" (the DefaultRule for the
> default locale only has an "other" rule).
>
> If it works the way I think it does, then you don't need the
> YourMessages_default.properties file.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to