3

Hi there I am using corelocation in my app and everything works fine and well. Except that i would like to have mkreversecoder give me the location in english.

Some parts of my app are dependent on the location, where by, it grabs some data from the server based on the location. The problem here is mkreversecoder follows the phone's language when retrieving the country

So australia becomes 오스트 레일 리아

Is there anyway that i can force mkreversegeocoder to give me location only in english?

Thanks

Veeru
  • 4,936
  • 2
  • 43
  • 61

1 Answers1

2

For now i have chose this method

  1. Grab the current language from standardDefaults
  2. Set the language to English ( [[NSUserDefaults standardUserDefaults] setObject: [NSArray arrayWithObjects:@"en", nil] forKey:@"AppleLanguages"];)
  3. Once the reverse geo coding is done, reset the language with the value grabbed in step 1

Is there any other sane way?

Veeru
  • 4,936
  • 2
  • 43
  • 61
  • 1
    If your code is only looking at the country string for some logic, then the placemark.countryCode will be the same (eg "AU") regardless of the language setting. If you really need everything in English, another option instead of changing the settings is to call [Google's reverse geocoding api](http://code.google.com/apis/maps/documentation/geocoding/#ReverseGeocoding) directly which accepts a language parameter. –  Jan 04 '11 at 16:09
  • Thanks for the tip aBitObvious, but i think for now, switching the language sounds like a easy solution - rather than changing my code to read from google's api- but i might even do that. My question is, is there anythigng wrong with my approach? if there is sometihng wrong then i will switch to google's reverse geo coding – Veeru Jan 04 '11 at 17:19
  • I haven't used that setting but if you do find an issue, the direct call may be necessary until the option is added to MKReverseGeocoder. –  Jan 04 '11 at 19:08
  • Hey @Veeru, have you successfully submit your app to AppStore? Will Apple reject it? – Kjuly May 06 '12 at 14:25