Like I said, just reload the page with locale=locale_to_use: e.g.
public static native void redirect(String url)/*-{
$wnd.location = url;
}-*/;
redirect("http://mydomain.com/MySuperDuperApp?locale=en_US");
Refer to GWT's Internalization
Guide<http://code.google.com/p/google-web-toolkit-doc-1-5/wiki/DevGuideInternationalization>for
more information.
On Thu, Mar 19, 2009 at 7:10 AM, deeps <[email protected]> wrote:
>
> Can i pls have the code for localisation set.
>
>
> On Mar 19, 12:15 pm, Vitali Lovich <[email protected]> wrote:
> > Best way would be to actually redirect them to your app with the
> > localization set. That way, they load the app compiled for that
> > localization.
> >
> > The only tricky thing is maintaining persistence across the switch if
> that
> > is important.
> >
> > Otherwise, there's really no way to do it the GWT-way (AFAIK). You're
> only
> > other approach would be to walk over all DOM elements on the page that
> > display text & set it to the localized version, but I have a feeling
> you're
> > going to find the difficult to do, and possibly quite slow (not to
> mention
> > the difficulty of figuring out a way to actually load the localized
> > strings).
> >
> > You must remember that the localization that GWT does is at compile time
> -
> > it'll automagically create several different versions of your code with
> all
> > the different localizations you've set. All those strings actually get
> > inlined into your code & are static. When the browser loads your code,
> GWT
> > actually includes some preamble code that determines which code to load
> > depending on user-agent, localization, and any other pivots you may have
> > defined.
> >
> >
> >
> > On Thu, Mar 19, 2009 at 1:18 AM, deeps <[email protected]> wrote:
> >
> > > Hi, I am trying to design a code where locales can be changed both
> > > dynamically n statically within a calendar widget like datepicker. I
> > > would be grateful if any of u helped me in this. Thank u.
> >
> > > Regards
> > > Deepthi- Hide quoted text -
> >
> > - Show quoted text -
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---