On 4 nov, 07:10, prody <[EMAIL PROTECTED]> wrote:
> > I don't think it can be done.  By the time you're executing GWT code,
> > it's too late to change the meta tag.
>
> > The host page (which is the page that needs to contain a meta tag)
> > executes the GWT bootstrap script.  It's the bootstrap script that
> > looks at, amongst other things, the chosen locale, and then downloads
> > a script specific to the execution environment.  It's that
> > environment-specific script that is your GWT app and, by the time it's
> > executing, the locale has already been chosen.
>
> I followed the approach given in Google Plats 
> project.http://code.google.com/p/narorumo/wiki/Plats
>
> If I put the following lines in my application main html page, the
> locale changes to that of my browser.
>
>   <head>
>     <script src="http://plats.appspot.com/put_variable.js?
> available=fr,jp,es,en">
>     </script>
>   </head>
>
> In the above code snippet, available parameter represents the
> languages supported by my application.
> put_variable.js script parses the Accept-Language header sent by my
> browser, and puts the
> <meta name="gwt:property" content="xxx">
> tag in the application main html page.

Well, actually, it's set_metatag.js (put_variable.js just sets a
global JavaScript variable)

> Can I do something similar with Java code, since my backend is in
> java?

Of course, and you can use some code from the GWT-Incubator to help
you. See http://groups.google.fr/group/Google-Web-Toolkit/t/84c0ad3907e603cd
(which appears to be, uh, no more than 5 days ago !!!)
--~--~---------~--~----~------------~-------~--~----~
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