I have implemented Language Localization in my iOS App. So, now user can set the Arabic Language in my iPad Application.
I am getting the localized string response from the server and now I want to set this localized string to my UILabel
in Right To Left format with Right Alignment.
Update :
My server response is already in RTL format. Now, I just wanted to set the text alignment to right when I have Arabic text in my UILabel
.
Right now I have to write code to set the alignment of UILabel
based on the language.
So, I just want to know if there is any property available for UILabel
by setting which I can make the text of UILabel
Right Aligned in case of Arabic Language.
attributedText
property for the label, you can apply a mutable paragraph style with the RTLbaseWritingDirection
set. But, the label should apply the correct writing direction to the text. If you're using constraints, make sure you have your Leading and Trailing constraints set up correctly. – Lempres