Installation language for reverse geocoding Gmaps v.3

Can anyone now set the language for the reverse php response to geocoding? (always given en)

**Here is the code**
<code>
$api_key = "***";

$url = 'http://maps.google.com/maps/geo?q=49.8411860,30.1066580&output=json&sensor=true_or_false&key=' . $api_key.'&language=uk';

$data = @file_get_contents($url);

$jsondata = json_decode($data,true);

if(is_array($jsondata )&& $jsondata ['Status']['code']==200) {
      $addr = $jsondata ['Placemark'][0]['address'];
}

echo $addr;
</code>
**The Output is**

"L'va Tolstoho street, Bila Tserkva, Kyivs'ka oblast, Ukraine"

      

+3


source to share


1 answer


If you want English then change the language of the URI variables to 'en' ie & language = en

$url = 'http://maps.google.com/maps/geo?q=49.8411860,30.1066580&output=json&sensor=true_or_false&key=' . $api_key.'&language=en';

      



Google Maps API Localization Reference Guide

See a list of all language codes on wikipedia

+1


source







All Articles