When i call
geocoder reverseGeocodeLocation:currentLoc completionHandler:
i get all the data (city, county, ...) in a language according t
For future readers, the accepted answer is not true (at least not any more).
UserDefaults.standard.set(["en"], forKey: "AppleLanguages")
gc.reverseGeocodeLocation(loc) {
print($0 ?? $1!)
UserDefaults.standard.removeObject(forKey: "AppleLanguages")
print(UserDefaults.standard.object(forKey: "AppleLanguages") as! [String])
}
Calling removeObject(forKey:)
is important since you want to reset the returned value in UserDefaults
to the system settings. Some answers make you hold the original value from calling UserDefaults.standard.object(forKey: "AppleLanguages")
and set it after getting the address, but this will stop your UserDefaults
from being in sync with the global Language Preferences in iOS "Settings" app.