How to get country name from iPhone locale settings

    NSLocale *locale = [NSLocale currentLocale];
    NSString *countryCode = [locale objectForKey: NSLocaleCountryCode];
   
    NSString *countryName = [locale displayNameForKey: NSLocaleCountryCode
                                                                             value: countryCode]];

Blogged with the Flock Browser
Advertisements

16 Responses to “How to get country name from iPhone locale settings”

  1. Shawn Arney Says:

    Thanks for the sample code. Very straightforward. Much appreciated đŸ™‚

  2. Tarun shrarma Says:

    Thanks

    Easy and nice code.

  3. Mike Says:

    Thank you, this was very helpful!

  4. Bart Says:

    Thanks!! LES IS MORE đŸ˜‰ in this case, it is very useful!

  5. Phil Says:

    Thanks mate! Greetings from Germany!

  6. Laxman Says:

    Thank you very much !! help ful

  7. 2010 in review « TEchnical SOlutions Says:

    […] How to get country name from iPhone locale settings March 2009 7 comments 4 […]

  8. shirish Says:

    Quiet Helpful.

  9. prasanth Says:

    hai,
    Is There any way to get the Users first name,last name and email id……

  10. Eli Says:

    Thanks. Simple and useful.

  11. Robert Johnson Says:

    My iPhone says my country twice, when I ask for the weather and obviously can’t find info for Trinidad and Tobago, Trinidad and Tobago. Tried everything in settings. Any ideas?

  12. Arian Says:

    How do you use this code?

  13. ramakrishna Says:

    How do i use this code?

  14. sudha Says:

    Thanks a lot.
    Its very nice and small code ,it saves my time.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: