Any way for localized ABPersonViewController?
Can't get any information about localiz开发者_运维问答ed ABPersonViewController...
I use Russian language on my iPod but when I call ABPersonViewController it always appears in English. I check other apps in AppStore - the same result.
Is there any way to call localized ABPersonViewController?
thx
Project->Info->Localization->+ choose your language. That's all.
From ABPersonViewController docs
displayedProperties Optional. Identifies the set of properties (such as name or telephone number) of displayedPerson the receiver displays.
@property(nonatomic, copy) NSArray *displayedProperties Discussion The default value of this property is NULL.
The properties are specified using an array of NSNumber objects representing ABPropertyID values.
To have the receiver display a single property for displayedPerson, such as telephone number, set displayedProperties to an array with a single value, such as kABPersonPhoneProperty.
Availability Available in iOS 2.0 and later. Declared In ABPersonViewController.h
From ABPerson docs
ABPersonCopyLocalizedPropertyName Returns the localized name of a person property
CFStringRef ABPersonCopyLocalizedPropertyName (
ABPropertyID property ); Parameters property The person property whose localized name is being returned. Return Value The localized name of property.Availability Available in iOS 2.0 and later. Declared In ABPerson.h
Edit,
The internationalization is made automat for you, You just need to create in your bundle Directory "ru.lproj" directory.
Then from File - > New File - > Resource -> Strings File. Save it in ru.lproj with "Localizable.strings". And there you go.
You can set "Localization native development region" to your region in the .plist file.
精彩评论