Ok I came up with a solution that is good enough for me.

In the head tag of the host html page, use (and customize) this
script.

    <script type="text/javascript">
            var l_lang;
            if (navigator.userLanguage) // Explorer
                   l_lang = navigator.userLanguage;
                else if (navigator.language) // FF
                   l_lang = navigator.language;
                else
                        l_lang = "en";

                if(l_lang == "en")
                        document.write('<meta name="gwt:property" 
content="locale=en">');
                else if (l_lang == "fr")
                        document.write('<meta name="gwt:property" 
content="locale=fr">');
        </script>



Cheers,
Mehdi


On 2 sep, 04:55, Kroc <[EMAIL PROTECTED]> wrote:
> > Your application does this automatically.
>
> How ?
>
> Language can be selected at runtime by url ( locale=... )
> this can be usefull for a user selection.
>
> Or with a meta tag in your html.
> In my case, html base page is in fact a jsp which contain this line to
> determine default user language:
> <meta name="gwt:property" content="locale=<
> %=request.getLocale().getLanguage()%>_<
> %=request.getLocale().getCountry()%>">
>
> On 2 sep, 10:26, Thomas Broyer <[EMAIL PROTECTED]> wrote:
>
> > On Sep 1, 8:23 pm, Folke <[EMAIL PROTECTED]> wrote:
>
> > > Your application does this automatically.
>
> > Have you tried?
>
> > I'd rather have a look at this group's archives...
> > ...and rely on server-side content negotiation (there's no cross-
> > browser way to determine the user's preferred locale(s)).
--~--~---------~--~----~------------~-------~--~----~
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