I uses CLGeocoder to decode the CLLocation from longitude/latitude to place names. It works fine. But there is still one thing bothers me. When i set the device language to English, the result of the code below:
- (void)locationManager:(CLLocationManager *)manager
didUpdateToLocation:(CLLocation *)newLocation
fromLocation:(CLLocation *)oldLocation{
/* We received the new location */
NSLog(@"Latitude = %f", newLocation.coordinate.latitude);
NSLog(@"Longitude = %f", newLocation.coordinate.longitude);
[self.geoCoder reverseGeocodeLocation:newLocation completionHandler:^(NSArray* placemarks, NSError* error){
MKPlacemark *placemarker = [placemarks objectAtIndex:0];
NSLog(@"%@",placemarker.locality);
}];
[self.locationManager stopUpdatingLocation];
}
is displayed in english, like : chengdu.
when i change the device language to Chinese,
placemarker.locality
returns a Chinese character value.
But what i really want is that it will always return an English character value (no Chinese character value). I guess this is something related to the locale. Can anyone help on this? Thanks.