Re: I18N - How to set locale per code?

2011-01-04 Thread Myles Bostwick
I'm solving this problem by having the webserver do a rewrite of the URL, appending the appropriate language code, based on what the browser sends as their accepted language. This method could easily be extended to instead examine a cookie that is sent in. This way no reload is required and it

Re: I18N - How to set locale per code?

2011-01-01 Thread paxdei
Static string internationalization means that the gwt compiler generates extra permutations for every locale/browser combination, and changing the locale on the client means replacing the currently loaded permutation with a different one, so I guess there is no other way. Anyway, you should be abl

Re: I18N - How to set locale per code?

2011-01-01 Thread andrew_d_mackenzie
I'd like to add my 2cents to the original question. Is there no other way to change locale than adding parameter to url and doing a refresh? -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-t

Re: I18N - How to set locale per code?

2010-12-31 Thread David Chandler
For more on the dynamic host page approach, see http://code.google.com/webtoolkit/articles/dynamic_host_page.html /dmc On Fri, Dec 31, 2010 at 1:02 PM, jhulford wrote: > Presumably you're deploying your app as a .war to a Servlet container > (like Tomcat or Jetty), what you'll want to do is cre

Re: I18N - How to set locale per code?

2010-12-31 Thread jhulford
Presumably you're deploying your app as a .war to a Servlet container (like Tomcat or Jetty), what you'll want to do is create a .jsp (instead of a plain static .html file) that dynamically writes out your host html and have that include the user's locale preference. If you're not using a java ser

Re: I18N - How to set locale per code?

2010-12-30 Thread Jim Douglas
Instead of asking the user for a locale preference for your page, why not just assume that his browser is configured to tell you his preferred language using the HTML Accept-Language header? http://www.w3.org/International/questions/qa-accept-lang-locales http://download.oracle.com/javaee/6/api/ja

Re: I18N - How to set locale per code?

2010-12-30 Thread Magnus
Hi Jhuford, this sounds interesting. I have the user's choice in a database. But my host page is always the same. I have only one host page, which is nearly empty. Everything including the login window is generated by code. At the moment, I feel unable to test the method you described. Could you

Re: I18N - How to set locale per code?

2010-12-30 Thread jhulford
You can store off the user's chosen locale into a database of some sort and then when your host page is being written after the user logs in (like w/ jsp or php or something) load the users language preference and set it via the meta tag. The only time you'd need to reload the app then is on that

Re: I18N - How to set locale per code?

2010-12-30 Thread Magnus
Hi, I actually cannot live with the "reload": Assume a user had set his language in some profile settings area of your application. When he comes into your app, he logs in and the app loads for the first time. Then, immediately after loading the app, it is immediately reloaded to realize the loca

Re: I18N - How to set locale per code?

2010-12-29 Thread Y2i
GWT showcase appends ?locale=xx_YY to the URL and simply reloads the page. It does the same as the i18n document suggests. On Dec 29, 10:56 pm, Magnus wrote: > Hi, > > I followed the instructions in the article "Internationalizing a GWT > Application" and prepared my application for "Static Stri

Re: I18N - How to set locale per code?

2010-12-29 Thread Nirmal Patel
Look in I18N.gwt.xml if (locale == null) { * // Look for the locale on the web page* locale = __gwt_getMetaProperty("locale") } if (locale == null) { // Look for an override computed by other means in the selection script locale = $wnd['__gwt_Locale'];

I18N - How to set locale per code?

2010-12-29 Thread Magnus
Hi, I followed the instructions in the article "Internationalizing a GWT Application" and prepared my application for "Static String Internationalization": http://code.google.com/webtoolkit/doc/latest/tutorial/i18n.html Great! Appending the locale in the URL results in another language! But appe