Displaying a localised version of iPhone Contact Picker (ABPeoplePickerNavigationController) - iphone

In my app I use the ABPeoplePickerNavigationController to present an address book to the user so they can select a contact from their contacts.
I want my app to support multiple localizations (English, French) and I was expecting the ABPeoplePickerNavigationController to display the correct localised strings when I changed the phone's locale. However, this does not happen - no matter what language I change the iPhone to, the ABPeoplePickerNavigationController always displays English strings. This is strange as the Contacts application on the iPhone does change its text depending on the locale.
Does anyone know how to instruct the ABPeoplePickerNavigationController to display the correct text for the current locale?

Is your app already localized or are you just planning to add localization later? AFAIK, the built-in controls only display localized texts in those languages that your app supports.

fileName : InfoPlist.strings
view -> Utilities -> show file inspector
-> Localization "+" button click >> add language

Related

How to set default language to Arabic instead of english ios swift?

I have developed the app having 2 language(English & Arabic). I have given screen when you can switch the language when you switch language you will need to restart the app and work proper.
But the problem is no i wants to display default language as arabic. I have set "Localization native development region (CFBundleDevelopmentRegion)" as "ar" its not works properly display weired somehow.
I event try to set AppleLanguages in NSUSerDefault but its not display my storyboard as arabic.
Thanks in Advance!

change application icon and application name through localization in Xcode iPhone programmatically

I am working on Localization of my App to support English and Spanish language.I have created the string files for both english and spanish.All the strings in my app are managed by
`NSLocalizedString(#"key", nil);`
and give the expected result.I have given an option for changing the language inside my app in a tableview.
NSUserDefaults *nsdefault=[NSUserDefaults standardUserDefaults];
nsdefault setObject:[NSArray arrayWithObject:#"en"] forKey:#"AppleLanguages"];
nsdefault synchronize];
1) I need to change the app name and icon depending on the selection of language in tableview.For app name i used "CFBundleDisplayName" = "Librairie";
so that the next time i launch the app the app name and icon should change.
2)for app name
`"CFBundleDisplayName" = "Librairie";`
.It works only if i go to iPhone's setting and change the language manually.Through code it doesn't work.
Please suggest me the approach i can follow so that when i choose spanish language from my tableview the name and icon gets replaced.
can i localize the app icon image also like we do for any image used in UIView ?
Any help would be appreciated
Thanks
You can't change neither the app icon, neither the display name. Both of those are read only once the app is installed, and even if you could, those would create a really bad user experience.

EKEventEditViewController localization

How to change the default language in EKEventEditViewController, it is always English, even if I set AppleLanguages object manually
I solved this problem by adding a Localizations item to my app plist. For example, if you want your app to show the form in Spanish, add a Localizations key in your plist and inside it create the Spanish item.
1) In info.plist set "Localization native development region" to your languages e.g. en,de,fr and so on.
2) Add new file -> iOS resource - > Strings File and name it Localizable.
Select this file in your bundle and add on the "Utility View" your localizations.
Then your EventController should be in the correct language.

localization problem in iPhone App with XCode

i need to localize an existing iphone app. I've added strings files for German and English, which work well.
BUT !
I've also opened the Info-Pane of the XIB Files, klicked "add Localization", chose the languages (German and Englisch). In the View of all Ressources in XCode is see under the XIB Files now "German" and "Englisch".
I can translate all design elements in Interface Builder for German and Englisch. If i start the App on the Device or in Simulator there is always the german language displayed, also if i change the device language to "English". I also cleared all targets and deleted the app on the device and the simulator before testing.
What am i doing wrong ??
Any help is much apprechiated !
Greetings
MadMaxApp
ok ... looks like XCode has still a bug. The localization should not be named "German" and "Englisch". You need to name it "de" and "en". After clearning all targets and running in Simulator the right language xib is displayed.

How to Show a GPL licence in iphone application bundle

i am making an app for iphone and for that i am using certain free libraries.My problem is that i want to show their complete license of nearly 4-5 pages in my application bundle so that a user can open settings in iphone and see that licensing page at one time but i am unable to do it.I have read these Specifiers for making an application bundle .
PSGroupSpecifier
PSTitleValueSpecifier
PSTextFieldSpecifier
PSSliderSpecifier
PSToggleSwitchSpecifier
PSMultiValueSpecifier
PSChildPaneSpecifier
but i want to show a page full of text like Settings->General->About->Leagl
just like in iphone through PSChildPaneSpecifier .Please help me how to do this>???
Thanks
You can create the same effect as used by Apple's iWorks apps for the license > section of the settings, without using any custom preference controller. Note this works for iOS 5 on the iPad, I have not tried it elsewhere. Use a PSChildPaneSpecifier for the initial control in the root plist. This points to the name of another plist file which will be the displayed child pane. You do not add .plist to the name within the root.plist file, it is implied. This plist file must be within the settings bundle. Next, use PSGroupSpecifiers in the child pane as the controls. For each paragraph use another PSGroupSpecifier - so the thing will scroll. Only use the Title section of the PSGroupSpecifier. The next gotcha that I found, was that by putting the strings in the plist file, the text was clipped in portrait orientation, so a placeholder string needs to go in the plist file and a StringTable used to point to a strings file. Text read from the strings file is properly kerned and displays without clipping.
The iPhone's "Legal" page is a custom preference controller which you can't use (not even with undocumented methods – you need to write a preference bundle in system locations which AppStore apps can't reach at all).
If you'd like to display the license, show it in the app.
I think you are going to need to use something like a UITextView, just make it non-editable. You can make in unobtrusive in your app but I think that is the only way to have 4-5 pages.
I don't think there is a nice way of displaying this in the preferences bundle. Personally I would either provide a series of url links or bring the preferences into the app itself. There is a good framework on github here that you may be able to modify.