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.
1641 questions
42
votes
9 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,497
  • 8
  • 38
  • 52
40
votes
6 answers

Matplotlib: Writing right-to-left text (Hebrew, Arabic, etc.)

I'm trying to add some text to my plot which is RTL (in this case, Hebrew). After some work managed to get it to display the text, but it's displayed LTR (meaning, in the reverese order). I've dug into the reference and did extensive search online…
Korem
  • 11,383
  • 7
  • 55
  • 72
37
votes
6 answers

brackets displays wrongly for right to left display style

The html code

hello (world)

you will see a page like this: (hello (world However,if I change the html code into

hello (world) again

Then the text displays normally: hello (world)…
user607722
  • 1,614
  • 2
  • 12
  • 19
37
votes
6 answers

Twitter Bootstrap CSS that support from RTL languages

I just discover Twitter Bootstrap and I'm wondering if there is a right-to-left (RTL) version of it. Does anyone know?
Ehsan
  • 2,273
  • 8
  • 36
  • 70
35
votes
5 answers

RTL is forced in RTL devices

The new version of React Native has issued support for RTL devices: https://facebook.github.io/react-native/blog/2016/08/19/right-to-left-support-for-react-native-apps.html However, it seems that in RTL android devices the RTL layout is forced and…
atlanteh
  • 5,615
  • 2
  • 33
  • 54
35
votes
5 answers

UICollectionView iOS 9 issue on project with RTL languages support

It seems like Apple's new feature of auto-flip interface on RTL languages cause problems when using UICollectionView. I used constraints of type Trailing/Leading for the collection view and they switched their values, as they should, on RTL…
MatanGold
  • 739
  • 10
  • 18
35
votes
3 answers

Why is a trailing punctuation mark rendered at the start with direction:rtl?

This is more a sort of curiosity. While working on a multilingual web application I noticed that certain characters like punctuation marks (!?.;,) at the end of a block element are rendered as if they were placed at the beginning instead when the…
GOTO 0
  • 42,323
  • 22
  • 125
  • 158
34
votes
5 answers

Why does "[x]y" display incorrectly in the RTL direction?

[x]y
You can see HTML text [x]y displays as x]y]. What is the reason of that result? PS: I get that result in Chrome 56.0.2924.87 (64-bit).
Sayakiss
  • 6,878
  • 8
  • 61
  • 107
34
votes
5 answers

use locale (ltr/rtl) for gravity in TextView

I have a simple TextView which should have android:gravity="left" for ltr system locales and android:gravity="right" for rtl system locales. The obvious choice would be: android:gravity="start" but then e.g. english text will always be left-aligned…
agrajag
  • 451
  • 1
  • 4
  • 13
33
votes
5 answers

How can I fill RecyclerView with GridLayoutManager from right to left

I'm trying to fill some data into a RecyclerView with GridLayoutManager: GridLayoutManager layoutManager = new GridLayoutManager(this, 3, GridLayoutManager.VERTICAL, false); This will fill the data into the grid from left to right. The first item…
31
votes
5 answers

How to detect whether a character belongs to a Right To Left language?

What is a good way to tell whether a string contains text in a Right To Left language. I have found this question which suggests the following approach: public bool IsArabic(string strCompare) { char[] chars = strCompare.ToCharArray(); foreach…
Patrick Klug
  • 14,056
  • 13
  • 71
  • 118
30
votes
8 answers

RTL is on web page reverses numbers with a dash

When my website displays Hebrew text mixed with numbers, and there is a number with a dash in the middle, the number with the dash in the middle is displayed RTL. For example, with the text: רמה 4–0, it should display 4-0 instead of 0-4, since it…
Yirmiyahu Fischer
  • 503
  • 2
  • 9
  • 22
30
votes
6 answers

Right To Left SnackBar

I want to display a text with an action on Design Support Library SnackBar. My language is writen in Right-to-Left. So how can i change SnackBar text and action direction? Something like this:
Seyyed
  • 1,526
  • 3
  • 20
  • 30
30
votes
7 answers

How to change navigation drawer font?

I want to use my own font for navigation drawer in android.I use the library comes with android studio according to this answer: https://stackoverflow.com/a/23632492/4393226. But I don't know how to change the font and make it RTL. I searched a lot…
Amir H
  • 1,116
  • 1
  • 11
  • 25
30
votes
9 answers

RecyclerView Grow Element From Right to Left

i use RecyclerView in horizontal direction and New element is left to right. and scrolling is ltr. how to change this direction? Xml Code:
javadroid
  • 1,421
  • 2
  • 19
  • 43