[pmwiki-users] Problem with Google Map API and locale de_DE

Patrick R. Michaud pmichaud at pobox.com
Wed Jun 7 10:28:59 CDT 2006


On Tue, Jun 06, 2006 at 09:23:02PM +0200, Christian Bartolomaeus wrote:
> Hi,
> 
> I just encountered the following problem with the new 
> Google Map API [1]: When using the Google Map API on a wiki which
> sets 
> 
>   'Locale' => 'de_DE'
> 
> via XLPage, the GMap-API seems to get confused. I guess it has
> something to do with using the dot '.' instead of the comma ',' when
> giving fractional numbers as values for latitude ('lat') and longitude
> ('lon'). When I try to produce a map with
> 
>   (: gmap lat=54 lon=13 :)
> 
> everything is okay. But as soon as I use
> 
>   (: gmap lat=54.09285 lon=13.3785 :)
> 
> at least the value of the longitude seems to be ignored or
> misinterpreted.
> 
> Is there something I can do about that?

The locale setting is causing periods to change to commas.
After the call to XLPage(), try restoring the locale back to
the standard dot:

    XLPage('de', 'PmWikiDe.XLPage');
    setlocale(LC_NUMERIC, 'C');

Pm




More information about the pmwiki-users mailing list