Questions tagged [right-to-left]

Right to Left (RTL) refers to the scripts of natural languages that are written and read from the right to the left instead from the left to the right, such as Hebrew, Arabic and Persian. For problems with interaction of right-to-left and left-to-right text, prefer the "bidi" tag.

Right to Left (RTL) refers to the scripts of natural languages that are written and read from the right to the left instead from the left to the right. Common examples include the Hebrew alphabet, used by the Hebrew and Yiddish languages, and the Arabic script, used by Arabic, Persian, and many others. For more examples and information, see this Wikipedia article.

Tag usage

  • For problems with interaction of right-to-left and left-to-right text, prefer the tag.
  • Consider adding a tag for the specific language you are using, such as , , , or , as the specific language and/or alphabet may display different behaviors under different circumstances (for example, initial forms in Arabic that have no analogy in Hebrew).

HTML example

Some UI technologies support right to left out of the box. For example the HTML standard has a dir attribute that may receive rtl or ltr (Left to Right) values.

Windows example

Most Windows forms controls also have a property called "RightToLeft", which is of type System.Windows.Forms.RightToLeft and can have the following values:

  1. System.Windows.Forms.RightToLeft.Yes - right to left is switched on.
  2. System.Windows.Forms.RightToLeft.No - right to left is switched off.
  3. System.Windows.Forms.RightToLeft.Inherit - right to left is inherited from the parent control.
1545 questions
267
votes
5 answers

Why does this code, written backwards, print "Hello World!"

Here is some code that I found on the Internet: class M‮{public static void main(String[]a‭){System.out.print(new char[] {'H','e','l','l','o',' ','W','o','r','l','d','!'});}} This code prints Hello World! onto the screen; you can see it run…
dumbPotato21
  • 5,353
  • 5
  • 19
  • 31
96
votes
7 answers

Android context.getResources.updateConfiguration() deprecated

Just recently context.getResources().updateConfiguration() has been deprecated in Android API 25 and it is advised to use context.createConfigurationContext() instead. Does anyone know how createConfigurationContext can be used to override android…
Bassel Mourjan
  • 3,074
  • 2
  • 24
  • 34
87
votes
12 answers

How to set Navigation Drawer to be opened from right to left

First of all I know this question appeared here before but after trying a lot I still didn't succeed. I working on the example from Android Developers site. I'm trying to set the menu to be opened from right to left instead of how its implementing…
galvan
  • 6,848
  • 7
  • 32
  • 52
64
votes
6 answers

RTL in Markdown

Is there any existing addon spec for markdown that includes support for RTL languages? What I'm hoping for is something like This paragraph is left to right <- This paragraph is right to left Or something... I can tweak my parser to handle this…
Karim
  • 17,557
  • 13
  • 57
  • 68
63
votes
14 answers

Aligning right to left on UICollectionView

this is a pretty straightforward question, but I haven't been able to find a definitive answer to it on SO (if I missed it, please correct me). Basically, my question is: Is it possible to align UICollectionView row contents from right to left…
62
votes
12 answers

How to make the text direction from right to left

I want to write text in (right to left language i.e. Arabic) in a TextView. But I want to make the text writing direction from right to left. gravity:rightwill align the text to right only. I want to justify the text from right to left ( to make the…
Adham
  • 58,520
  • 96
  • 215
  • 339
58
votes
16 answers

Identifying RTL language in Android

Is there a way to identify RTL (right-to-left) language, apart from testing language code against all RTL languages? Since API 17+ allows several resources for RTL and LTR, I assume, there should be a way, at least from API 17.
cyanide
  • 3,512
  • 3
  • 20
  • 31
51
votes
5 answers

right-to-left (RTL) in flutter

I was using Flutter more than a week, and wanted to create an Arabic (right-to-left) app. I was reading Internationalizing Flutter Apps, but it didn't mention how to set the layout direction. So, how to show right-to-left (RTL) layout in Flutter?
48
votes
2 answers

UITextView renders custom font incorrectly in iOS 7

My app uses a UITextView to input Syriac text (Estrangelo font), but UITextView renders some letters incorrectly like this: I tested it with a UILabel and a UITextView. UILabel displays it correctly, but UITextView incorrectly displays the top dots…
LE SANG
  • 10,607
  • 7
  • 55
  • 78
42
votes
10 answers

Android : Change entire app layout directions programmatically

How can I change entire app layout direction to RTL? I am writing an app that user must select it's language in first launch and the layout should change based on user selection to RTL or remains LTR. I used to add android:supportsRtl="true" to the…
40
votes
1 answer

RTL Support: Disabling it only for specific UI components

I have a custom video player Activity. I am forced to enable RTL Support in my Application. But doing so will result in a Right-To-Left aligned ProgressBar. (And that looks ugly) I want my ProgressBar to stay LTR in my RTL enabled Application. Is…
Behnam
  • 5,884
  • 5
  • 31
  • 65
39
votes
2 answers

Right to left edges in dot (Graphviz)

I'm trying to display edges going from right to left (i.e. backwards) using dot: C <- A -> B The best I could do was: digraph { a -> b; c -> a [dir="back"]; {rank=same;c a b} } ..which is fine, except I don't like using c -> a when the edge…
Nickolay
  • 28,261
  • 8
  • 94
  • 160
38
votes
8 answers

Right to left Text HTML input

For my website, i need to provide arabic support. Part of it is to provide input textboxes where when user types in, the new characters have to be appended to the left and the text has to be right aligned. setting the css property to…
Anand
  • 9,892
  • 24
  • 86
  • 132
38
votes
8 answers

android determine if device is in right to left language/layout

Is there a way to determine if the device is in a right to left language (something like Arabic) as opposed to something that's left to right (English)? Something compatible with older API levels (down to 10) is necessary SOLUTION i ended up using…
joshkendrick
  • 3,287
  • 7
  • 31
  • 50
38
votes
3 answers

How to specify RTL specific drawables

I have few images that looks different on right-to-left. Is it possible to create rtl specific drawable directory or some rtl post-fix for file names to auto-load relevant images? Looks like ldrtl post-fix, added from 17 lvl, is good only for…
Vitaliy A
  • 3,127
  • 1
  • 29
  • 30
1
2 3
99 100