Thanks Thomas I really appreciate your Test Case with more than 2 languages and the link to GWT incubator.
I will work on a solution to cover multilingual application. Regards, Bernie1953 On Oct 6, 12:29 pm, Thomas Broyer <t.bro...@gmail.com> wrote: > On Oct 6, 2:24 pm, Bernie1953 <swtbclem...@gmail.com> wrote: > > > > > I was looking at a way for a GWT application to use the Browser's > > language preference without having to either provide the parameter > > (locale=fr) on the URL or to add the metatag for the locale in the > > HTML. > > > The solution is quite easy to implement as long as the GWT application > > is running within a Servlet container (e.g. Jetty, Tomcat). > > > The first step is to have the GWT application localized for the > > language you want to use. I will not explain how to do that since the > > documentation of GWT is quite clear. > > > The second step is to create a JSP from the HTML, i.e. copy the HTML > > as JSP. > > For example: copy TestLocale.html to TestLocale.jsp > > > You add the following lines at top of the JSP: > > <%@ page language="java" contentType="text/html; charset=UTF-8" > > pageEncoding="UTF-8" > > import="java.util.Locale" %> > > > You add the following metatag within the head tag of the html > > contained in the JSP > > <meta name="gwt:property" content="locale=<%=request.getLocale() > > %>"> > > That's not enough, you should do "content negotiation" against the > list of locales supported by the GWT app. If the app is available in > Spanish and English and my browser is configured to send French as the > preferred language and Spanish as the second, then I should get the > app in Spanish, not in the "default" locale (which is likely to be > English). > Have a look > at:http://code.google.com/docreader/#p=google-web-toolkit-incubator&t=Se... -- http://groups.google.com/group/Google-Web-Toolkit-Contributors