Lamhot / php-google-map-api

Automatically exported from code.google.com/p/php-google-map-api
0 stars 0 forks source link

Setting language code #6

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In some cases, the display language in the direction description is not fully 
correct. So it is mixed. Description is en and first line is in your browser 
language.

The Problem is also described here:
http://code.google.com/p/gmaps-api-issues/issues/detail?id=2229&q=apitype%3AJava
script3&colspec=ID%20Type%20Status%20Introduced%20Fixed%20Summary%20Internal%20S
tars

A possible solution is, to add the language code to the script loading of the 
api:
http://code.google.com/intl/de-DE/apis/maps/documentation/javascript/basics.html
#Localization

But this is not possible in the current version. So it would be great to 
overwrite the language code in next versions.

I changed it for me as additional parameter for the getHeaderJS($language) 
[line 1585]:
$_headerJS .= "<script type='text/javascript' 
src='http://maps.google.com/maps/api/js?sensor=".(($this->mobile==true)?"true":"
false").($language != false ? '&language='.substr($language,0, 2) : 
'')."'></script>";

Would be nice to include this in the next release. Mabye better with a setter 
for the language code.

Original issue reported on code.google.com by gnuffmas...@googlemail.com on 14 Jun 2010 at 12:23

GoogleCodeExporter commented 9 years ago
HI

We've added this to our own fork of the class.

he exact changes are in the link below if anyone needs it.
http://github.com/plank/php-google-map-api/commit/b4dc3a3b8bbbe13ffb450d411cd072
7062e1eb73

Original comment by mitchell...@gmail.com on 30 Jul 2010 at 10:03

GoogleCodeExporter commented 9 years ago

Original comment by b...@mycnl.com on 18 Sep 2011 at 5:11