geo - How to get localized names from Google Maps API? -


i trying obtain google maps api city in right language, doesn't work. example:

http://maps.google.com/maps/geo?hl=es&output=json&oe=utf8&q=paris

-> "localityname" : "parís" - > ok.

but why not working japanese example:

http://maps.google.com/maps/geo?hl=jp&output=json&oe=utf8&q=paris

has 1 idea can city names in different languages? there service can ask?

thanks nik

use ja rather jp japan - see spreadsheet of supported languages here codes.

requesting http://maps.google.com/maps/geo?hl=ja&output=json&oe=utf8&q=paris should give you

{   "name": "paris",   "status": {     "code": 200,     "request": "geocode"   },   "placemark": [ {     "id": "p1",     "address": "パリ, フランス",     "addressdetails": {    "accuracy" : 4,    "country" : {       "administrativearea" : {          "administrativeareaname" : "イル・ド・フランス",          "subadministrativearea" : {             "locality" : {                "localityname" : "パリ"             },             "subadministrativeareaname" : "パリ"          }       },       "countryname" : "フランス",       "countrynamecode" : "fr"    } },     "extendeddata": {       "latlonbox": {         "north": 48.9153630,         "south": 48.7979015,         "east": 2.4790465,         "west": 2.2229277       }     },     "point": {       "coordinates": [ 2.3509871, 48.8566667, 0 ]     }   } ] } 

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -