How to add rtl support to my ios app - ios

I am localizing my app and wanted to add some rtl support as well (my app is currently in ltr).
What would be the best approach for providing such localization? I was thinking of creating different xib's for rtl and ltr, but then how would I load the correct one?

I asked a question similar to yours not so long ago: How does waze change objects location with their localization?
Your best bet would be to use a different xibs \ StoryBoard and differentiate between the two after checking the local settings. You could also ask the user for his native language to trigger the right StoryBoard (some users like to have controler of the language they are getting, even if there phone is in another language)
If you are going to support iOS 6 and there is a way achieving the above with AutoLayout but I'm not sure that's what you are looking for.

Related

iOS App with no story board (Size classes and Device type limitations)

Lets say I don't want to use a UIStoryboard in my app. Apple pitches UIStoryboards hard and they also pitch the ability for UIStoryboards to allow you to create a universal app with ease.
I don't want to do this though. So, without listing my long list of reasons my first question is:
Is it smart/acceptable to remove story boards?
Second. Lets say I want to check stuff like Device type to make decisions about what UI to display? I can find plenty of UIDevice extensions that allow for this with with one limitation. If you use these UIDevice extensions when on a simulator you have no way of knowing what the simulator is simulating. So, testing your app on the simulator is not longer an option.
Finally, lets say I used the Size Class API's that Apple provides to try and make UI Code decisions with out a UIStoryboard. Is there any way to get a reference to these size classes pre view loading? The classes only seem to be on UIView and are not available when making window level decisions on app launch.
Is it smart/acceptable to remove story boards?
Sure. Building your UI either in code or interface builder is really up to you, up to the team, or up to the company. If that's only your question, this thread would be closed as that is opinion-based. In your second question, I don't think that's a question.
As for your last question, I'm attempting to answer this question though I do not fully understand it. Perhaps this would help: https://developer.apple.com/documentation/uikit/uitraitcollection
And autolayout should be the answer to that.

Manual language selection in swift by using picker view

I have a picker view which I want it to change the language of the app, I have localized my app with 3 languages and it switches to different languages when I change device language but how can I use the picker view to change the language of the app ?
I'm using Xcode 7 and swift 2.1
Short answer: You can't. The system is starting your localized app according to the device settings, which you cannot override.
Side note: If you opt to not use any localization features provided by apple and implement everything yourself, you may provide whatever means to change your own language setting in-app. But that is a real pain and you are likely to make mistakes, not taking into account anything.
If you want to go down that road, see semanticContentAttribute to help with problems regarding RTL languages.
Also, please note that this might become a problem in review. Most apps should not need to reinvent the wheel here.

IOS Internalization MultiLanguage change by run time

I have an IOS app and i want to add multi language support. For Example; there are two button first for English and second for Dutch. If user presses the button English the app language change to English. The Dutch button for Dutch language. But there is some constraints. I search for many solutions.
I dont want to use the language option at Iphone "Settings"
The user wont restart the phone to see the changing language.
I need any help, i'm so desperate :(
This question was asked many times.
You can easily implement your own language system. The NSLocalizedString that Apple uses is a macro, which you could change or just make your own macro for localization. That way you can fully control what is being localized and what not and can change it at runtime. See those projects for example: TCLocalizer and DPLocalizationManager.
They both allow runtime localization of your view controllers. And there are many more, such as:
Qlovr/QVLocalization
illoyd/CAFLocalizables
mumensh/iOS-Localization
All these links and libraries should help you figure out what exactly do you need and how to accomplish it.

iOS localization for unsupported languages

I want to offer a “Nynorsk localization” option for my app. In the device settings there is no such option, but it looks like iOS actually supports this language, since availableLocaleIdentifiers do contain nn:
kCFLocaleCountryCodeKey = NO;
kCFLocaleLanguageCodeKey = nn;
So I'm confused, is Norwegian Nynorsk supported or not? It's not among device's international languages, but it is among availableLocaleIdentifiers.
I know there are some ways to make custom ‘localizable strings’ work, but so far I did not find a way to make iOS return proper strings for instance for system buttons (Delete button for UITableViewCell, UIBarButtonItem-s from initWithBarButtonSystemItem:target:action, etc).
So the question is if there is a way to indicate a locale for system controls.
Translating iOS app to unsupported/non-standard languages
Choosing localization for unsupported languages
http://applingua.com/supporting-unsupported-languages-in-ios/

converting existing ios app to universal application

I need help on following topic.
I have an existing iPhone app (which I believe was created with "specific device" in mind). Now I want to convert it to "universal" app? Is it possible?
Finally, at some places there were also suggestions that one could create separate iPhone and iPad apps (in case of complex applications). I am not sure if this is what I want, since: I want my iPad and iPhone apps to share some code and at the same time to achieve "universal" functionality. What is the best way to do this? ps. so to sum up I would prefer to have it all in single project if this is possible.
Thanks in advance.
Gregory, as much I think you're talking about universal app. I suggest you, before go ahead you need to google, there are so many materials you'll find.
In short, for your case, you need to prepare two XIBs each for iPhone and iPad respectively and you've to exchange them that depends on your device. So, your code part will be same, but what will alter is the representation part ie IBs.
In any concern, just get back to me. :)

Resources