问题
I am using GMSGeocoder in my iOS app. And also I am using multiple languages(say English, Arabic). While using Arabic language I am getting an address in Arabic language. But I want to get the address in English language only.
For this I used geocoder.accessibilityLanguage = "en-US"
.
but it didn't work. Could you help me regarding this issue
func getAddressForLocation() {
let geocoder = GMSGeocoder()
geocoder.accessibilityLanguage = "en-US"
let coordinate = CLLocationCoordinate2DMake(Double(self.PickupLat),Double(self.PickupLong))
geocoder.reverseGeocodeCoordinate(coordinate) { response , error in
if let address = response?.firstResult() {
print(address)
}
}
}
来源:https://stackoverflow.com/questions/48656656/how-to-get-address-in-english-language-only-using-gmsgeocoder