You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk> on 2007/05/30 09:50:56 UTC

wicket gmap-contrib: broken on EU locales

Hi

I've been trying to set locale manually on specific form components or 
the whole from altogether, by overiding getLocale. Reason for doing this 
is that I wish to use US locale for converting the Lat and lang of the 
Gmap component. Google always keep their coords in US locale. This means 
that we have a problem using the gmap contrib on EU locales where the 
decimal seperator and point are reversed. A fix for it are to use 
getSession().setLocale(Locale.US); but this sets your complete 
application in US locale and data in other forms than those within gmap 
contrib will also be affected. How can I set locale for a form or 
specific formcomponents only?

regards Nino

Re: wicket gmap-contrib: broken on EU locales

Posted by Eelco Hillenius <ee...@gmail.com>.
> I've been trying to set locale manually on specific form components or
> the whole from altogether, by overiding getLocale. Reason for doing this
> is that I wish to use US locale for converting the Lat and lang of the
> Gmap component. Google always keep their coords in US locale. This means
> that we have a problem using the gmap contrib on EU locales where the
> decimal seperator and point are reversed. A fix for it are to use
> getSession().setLocale(Locale.US); but this sets your complete
> application in US locale and data in other forms than those within gmap
> contrib will also be affected. How can I set locale for a form or
> specific formcomponents only?

You can't set it, but you can override Component#getLocale(), which
should do the trick.

Eelco