5

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?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
camilo
  • 1,451
  • 3
  • 20
  • 31

1 Answers1

4

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
  • 1,130
  • 1
  • 9
  • 12