How to set default language to Arabic instead of english ios swift? - 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!

Related

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.

Cannot type using non-QWERTY keyboards on iOS

My iPhone app can't seem to use soft keyboards that doesn't use the US-like QWERTY layout. That is when I set the keyboard to French or Germany, even text fields cannot take in text and an error message No input manager class for input mode error is shown in the console (when debugged under Xcode). Switching to the Emoji keyboard also shows the same problem. But the problem doesn't occur on QWERTY keyboard layouts, like Dutch and Indonesian keyboards.
The all cases are consistent and reproducible both the device (iPhone 4) and the iPhone simulator.
These are error messages in the Xcode's debugger console
When the keyboard is set to French:
No input manager class for input mode: fr_FR
When the keyboard is set to Germany:
No input manager class for input mode: de_DE
When the keyboard is set to Emoji:
No input manager class for input mode: emoji
My app's deployment target is iOS 3.1.3 (I'm still supporting 1st gen devices) but the development environment is Xcode 4.3.1 and iOS 5.1 Simulator. (I don't know whether this is relevant but just in case).
Anybody can help how to fix this?
Thanks in advance.
In my case, this was caused by my swizzling -[NSBundle infoDictionary] and returning a copy of the original dictionary.
I did this to be able to change info dictionary values at runtime (specifically, providing a non-shortened bundle display name to replace the shortened value used on the home screen).
The fix was to not return a copy of the info dictionary, but with some more reflection magic handle each key obtained from the dictionary:
https://github.com/Lyndir/Pearl/blob/master/Pearl/NSBundle%2BPearlMutableInfo.m
Not sure if this answer will help you but I found it from this link: http://code.google.com/p/networkpx/wiki/Creating_Keyboard_Bundles
Anyway here is what I am talking about:
Like UIKeyboardLayoutClass, this field also can be referred using the
same "=xxx" syntax. You can also write the class name of your own
input manager class here.
If this field is missing, no input managers will be used.
Hopefully this will help you!

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.

Displaying a localised version of iPhone Contact Picker (ABPeoplePickerNavigationController)

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

MFMailComposeViewController in other languages?

Does MFMailComposeViewController come only in English!?
I am toying around with the idea of using MFMailComposeViewController to handle sending email from my app but I need it to conform to the language environments of devices set to languages other than english. Is it possible to set MFMailComposeViewController to other languages? Even if I set my device's language to, say, japanese, the MFMailComposeViewController's To:, From:, Subject:, portions remain in english. How does one change the language of MFMailComposeViewController?
MFMailComposeViewController will display in the language the application is translated into rather than the language the user has selected; this keeps the text within the application consistent. Add a language project for the language you are targeting and the composer view will adopt that language.
The Done button on the keyboard, the Delete button that shows when a UITableViewCell is swiped and other built-in views behave similarly.