I thought GWT 1.6. would do this automatically - anyway an alternative
to the serverside detection is to do it in js on the clientside in
your html file - example:

I'm sure this f** forum will completely mess up my source code
again...
why can't we have [code] tags in a developer(!) forum?

<script type="text/javascript">
/* <![CDATA[ */
        lang="en";
        var navLang = navigator.language;
        if (navLang == null) {
                /* note: in IE the language attribute is named browserLanguage
                 * see: 
http://de.selfhtml.org/javascript/objekte/navigator.htm#language
                 */
                navLang = navigator.browserLanguage;
        }

        if (navLang.indexOf("en") > -1) {
          lang="en";
        } else if (navLang.indexOf("de") > -1) {
          lang="de";
        }
}
document.write("<meta name='gwt:property' content='locale="+lang
+"'>");
/* ]]> */
</script>


On 30 Nov., 11:35, Jan Ehrhardt <[email protected]> wrote:
> We do it in a Java / Spring application by server side detection. The
> HttpServletRequest object knows about the preferred language of the
> requesting browser. Instead of a plain HTML page we return a JSP, that
> allows us to set the language property as a meta tag. GWT's i18n mechanism
> reads the property and choses automatically the correct language.
> Of cause, i18n is done by GWT's mechanism.
>
> Regards
> Jan Ehhrhardt
>
> On Mon, Nov 30, 2009 at 10:15 AM, Zé Vicente <[email protected]>wrote:
>
> > Hello all,
>
> > I have some users of my application that are not happy about the fact
> > that my application is not displayed by default using the language of
> > their browsers.
>
> > How is that possible? Do you have some tips about this topic? What can
> > i do to make sure that gwt will download the version corresponding to
> > their language?
>
> > Before you ask, their language is available!
>
> > Regards,
> > José Vicente
>
> > --
>
> > 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]<google-web-toolkit%[email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

--

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