问题
I'm using the following link.
But, the result is not Chinese.
My server is Amazon Web Services (AWS).
回答1:
From https://developers.google.com/maps/documentation/geocoding/intro#geocoding
The geocoder will do its best to provide a street address that is readable for both the user and locals. To achieve that goal, it will return street addresses in the local language, transliterated to a script readable by the user if necessary, observing the preferred language. All other addresses will be returned in the preferred language. Address components will all be returned in the same language, which is chosen from the first component. Should names not be available in the preferred language, the closest match will be used
This is probably easier to grasp through examples. The result in your example is an address in the USA, where the local language (at least officially the major one 0:) is English, and that's the language in which the address is useful in practice.
Consider this: what can you do with a US address all in Chinese?
It would not be useful for a Chinese speaker tourist, because it cannot be compared with local street signs.
It would not be useful for a local (assuming English speaker, not Chinese speaker) because it is not even readable.
The English address is readable for both, and that applies to both the choice of language and script. This is also consistent with Google Maps: just click once on any point on a street, you'll see the address is in English, despite the language preference override to zh-CN:
https://www.google.com/maps/@40.714224,-73.961452,18z?hl=zh-CN
Maybe it's better illustrated with this example:
https://maps.googleapis.com/maps/api/geocode/json?&latlng=22.277978,114.174213&language=zh-CN
formatted_address: 香港灣仔軒尼詩道183-185號兆安大樓
https://maps.googleapis.com/maps/api/geocode/json?&latlng=22.277978,114.174213&language=de
formatted_address: Siu On Mansion, 183-185 Hennessy Rd, Wan Chai, Hongkong
Address in English is (more likely) usable by both locals and a German tourist (country name is always in your chosen language).
来源:https://stackoverflow.com/questions/33520686/how-can-i-get-chinese-words-using-google-api-with-json