views:

134

answers:

1

Hi.

In my app, the user is supposed to insert a phone number, which is then displayed somewhere else.

In the contacts application, when displaying a phone number, it automatically appears in the format of the language selected by the user.

Is there a way to do this automatically, or a way to detect the region and then adapt the displayed string?

A: 

You can use NSLocale for getting that type of information.

[NSLocale currentLocale];

Check the documentation for further information: http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSLocale_Class/Reference/Reference.html

schaechtele
Thanks a lot. Have a nice weekend.
camilo
By the way, I didn't accept the answer yet because i'll have to try it first, of course.
camilo