How can I implement iOS with RTL for Arabic Hebrew?
Solution 1
Little late to the party, but iOS 9 has a lot of these things built-in for free.
As of iOS 9, standard UIKit controls are flipped automatically in right-to-left languages (such as UITabBar, UINavigationBar, UITableView etc.), which in conjunction with Auto Layout can make your app 'just work' on RTL.
iOS 9 also has API for flipping images that are directionally-tied, among a few other things.
Solution 2
The best and the simplest way to enable RTL language support in your application is by defining constraints (Auto layout) rather than defining frames and bounds.
You can follow the link to kick-start auto layout implementation: Autolayout documentation by Apple
Admin
Updated on July 26, 2022Comments
-
Admin almost 2 years
I'm developing an application on Xcode 5 target iOS 7.1 with single view having only two items image and label on it, the Auto layout is enabled and the constraint is set using 'add missing constraint' with trailing and leading attributes.
According to Apple site below, this component should flip when I change to Arabic language with no more modification in the code, only with the help of the Auto layout, but this did not work https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/AutolayoutPG/Introduction/Introduction.html#//apple_ref/doc/uid/TP40010853-CH13-SW1
I search for other member question here and found that other saying that I should implement different storyboard for each language like what is mentioned in that link https://developer.apple.com/library/ios/documentation/MacOSX/Conceptual/BPInternational/BPInternational.html#//apple_ref/doc/uid/10000171-SW1
In my main storyboard I can found under localization only Base and english, how to add Hebrew and Arabic?
I found the below questions but they do not add much support: Multi Language Design support in IOS Right to left and left to right languages in the same app?
Flip UIImageViews for Right to Left Languages
iOS : How to build a bi-language iOS native application
Using Constraints in Auto Layouts of Objective C to support RTL Languages
RTL (Right-to-left) via auto layout broken on iOS 6.1 / iOS 7.0?
Right to Left UI in iPhone (Hebrew)
This link is similar to my implementation but it did not work with me like that one AutoLayout + RTL + UILabel text alignment