Is there RTL support in iPhone Application (Stoaryboard) [duplicate] - iphone

This question already has answers here:
How to set Arabic text to right and English text to left on same label
(2 answers)
Closed 9 years ago.
I am newbie for iPhone application. I am fine with English and Arabic text (selecting language at the start of application) however just curious how to format the screen from LTR to RTL.
Is there support in iPhone storyboard for RTL in layout?
Answer
I have asked somewhat same question and there I found answer.
How to set Arabic text to right and English text to left on same label

I am definetly NOT an expert, but I do use hebrew in my iOS apps.
iOS 6 SDK has something called "Auto-Layout", and the guide specifies that it enables you not to worry about RTL languages.
Cocoa Auto Layout allows individual views to declare their own preferred size, which means you don’t have to specify new layout if the label’s text changes—for example, because of localization, as illustrated in the right window. You don’t even have to specify new layout for languages like Hebrew and Arabic in which the left to right ordering of elements themselves should generally be reversed.
https://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/AutolayoutPG/Articles/Introduction.html

Alternatively, if you can view a language in a browser on the iphone you can try using a technology like phonegap.

Related

How to use different font for iPhone devices?

My website's Arabic font letters appears separated from each other which makes it un readable so I want to use a different font that will display only on iPhone & iPad devices in wordpress, I am using Elementor to design the site. Is there's a code or plugin I can use to apply different font for iOS devices?
https://ozaro.com/ar/our-history/
Well you cant do that just using css. You'll need JavaScript too.
Here is an answer on finding if device is iOS or not.
So basically this is what you'll have to do.
Set a unique classname for the parts of your website you need that font to be applied. E.g. "arabicf"
Go to your footer builder and drag drop an html widget.
Inside the widget write your js between script tags.
P.s. the logic behind the js is simple
If ios then "arabicf" style fontFamily = X.

Localisation and Autolayout

I am trying to add arabic support in my app , but app has language button , if user selects arabic he can see arabic interface/resources right to left stuff even device language is english . Due to Autolayout I am felling bit issues here
Due to autolayout if i select device language arabic it switches all layouts right to left even app language is english , is there any way I can force to layouts from left to right always
I have been in this situation couple of times. Where we need to switch the layout based on a single language button. Yeah it gets little awkward when we are using AutoLayout. So you can do one of the following things :
You can disable the Autolayout & you should flip all the view
components based on whether user has selected Arabic or English. How
to do this is for english You need to concentrate on X value of frame
& then when its arabic start the X of the frame becomes
view.frame.width - X.
Second thing you can do is as #Kirsteins said you need to change the
constraints from leading to left & then trailing constraint to right
constraints. Thats not it you then need to change these constraints
programatically on the language change.
HTH :)

How to Use text in Arabic in Iphone App

I want To Know that how we can use text as arabic in iphone applications and how we can create code . And also how we can show text in arabic on uilabel or uitextview.
It's definitely possible to write
yourLabel.text = #"إعدادات"; // "Settings"
iOS supports arabic language since 3.0.
You'll have to manage text alignments yourself if you want to display right-to-left text.

iPhone / iPad: Font issue for non-Latin languages

I have a problem about the font in iphone/ipad
Everyone knows UILabel can't do rich text.
So I choose FrontLabel http://github.com/zynga/FontLabel/blob/master/README
I guess what FrontLabel is doing is something like NSAttributedString and core text framework, and also, it is quite low level. But anyway, I have a problem.
If I want to display a mixed language text, let's say English + Chinese, and give the whole string a font of "ArialMT", then all Chinese characters are displayed like small squares.
I have tried, if I assign "STHeitiTC-Light" font to the text, no problem, both Chinese and English can be displayed, because STHeitiTC-Light is a Chinese font in iphone/ipad.
I think FrontLabel can't automatically select best font for non-latin text if the given font does not apply.
If I use UILabel and assign it as "ArialMT", and let it display text of Chinese or Japanese, NO problem, right? I guess apple is detecting font for different language?
Please give me some clues how can I solve this problem if I want to use FrontLabel?
Thanks
author of FontLabel here.
You're right, FontLabel does not do automatic font fallback if the glyph cannot be found in the selected font. Implementing such a behavior was outside the scope of the project, as it can be quite complex. UILabel does perform this, as it uses WebKit to do the actual text rendering and WebKit supports font fallback. I am unsure if CoreText provides this or if it behaves like FontLabel. In any case, if you need multiple fonts in FontLabel, you can specify different fonts for different ranges of your ZAttributedString. Unfortunately there's no easy way to determine which ranges are necessary without inspecting your string directly. If you know you're only working with English and Chinese, you could iterate over the characters in your string to determine if they're likely to be english or chinese characters, and use that to determine which ranges to assign fonts to. The alternative would be to teach FontLabel how to perform font fallback, but as I said before, that's quite complicated.
Alternatively, if you're comfortable require 4.0 or above on iPhone, you can try using CoreText. As I said before, I'm unsure if it does font fallback, but it's worth investigating.

Is UITextView enough for a simple writing app?

I'm trying to make a simple writing program, like Notes app for iPad, with a custom keyboard.
From OmniGroup's text editor open sources, I learned that UITextInput is mainly required to develop great text editor capable of having several fonts and size in one editor.
But it seemed tough to implement a lot of methods in UITextInput Protocol in order to build a text editor from scratch.
Do you think UITextView is enough to make a simple writing program?
Do most writing apps in AppStore use their own framework using UITextInput?
Thank you!
UITextView is the ideal view to display and edit multiple lines of text. You can format the text using font, size and color. The only formatting restriction is that you can have only one text format for the whole view. The Notes app written by Apple is a typically use of UITextView.
Check Apple documentation for more...
Cheers