This topic is locked

Google Maps in different language

9/17/2010 4:43:59 PM
PHPRunner General questions
D
Dale author

Is there any way I can dynamically add to the google map url to show the map in a different language.

I have checked and if you append to the requesting url ?hl=en for instance, the map will show in English. If you append ?hl=cn you get the map in Chinese Simple.
Where would I add the code snippet ?hl=".$_SESSION["language_code"]." to the url produced by phprunner.

I have a field with view as MAP and it all works perfectly. I just need this little tweek to continue with multi-language.
Again Thanks

Sergey Kornilov admin 9/18/2010

DaleM,
you can make this change in source/classes/listpage.php file. See my changes in bold:

function addCommonHtml()

{

if ($this->googleMapCfg['isUseGoogleMap'])

{

$this->body["begin"].= '<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=true&amp;hl='.$_SESSION["language_code"].'key='.$this->googleMapCfg['APIcode'].'" type="text/javascript"></script>';

}


We'll consider adding this as an option to PHPRunner.