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 开发者_C百科adapt the displayed string?
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
精彩评论