Мое приложение iphone должно разрешить адрес, основанный на широте и долготе пользователя. reverseGeocodeLocation работает отлично, но результаты на английском языке.
Есть ли способ локализовать результаты на других языках?
не удалось найти информацию об этом в яблоке или в другом месте.
Используемый мной код:
CLGeocoder *geocoder = [[[CLGeocoder alloc] init] autorelease];
CLLocation *location = [[[CLLocation alloc]
initWithLatitude:coord.latitude longitude:coord.longitude] autorelease];
[geocoder reverseGeocodeLocation:location completionHandler:^(NSArray *placemarks, NSError *error) {
NSLog(@"reverseGeocodeLocation:completionHandler: Completion Handler called!");
if (error){
NSLog(@"Geocode failed with error: %@", error);
[self displayError:error];
return;
}
if(placemarks && placemarks.count > 0)
{
//do something
CLPlacemark *topResult = [placemarks objectAtIndex:0];
NSString *addressTxt = [NSString stringWithFormat:@"%@ %@,%@ %@",
[topResult subThoroughfare],[topResult thoroughfare],
[topResult locality], [topResult administrativeArea]];
}
}