Answer the question
In order to leave comments, you need to log in
How to deal with inputs in the rtl version of the site?
The bidi
algorithm decides whether to display characters from left to right, or vice versa, and it does not always do this without problems .
Suppose there is a site with multilingual support, including rtl languages. And there is an input on this site for entering a phone number in a free format.
If you enter numbers in a row, or through a hyphen, then there are no problems, but the reaction to spaces raises questions for me.
I sketched an example . The numbers are the same in all cases, but entered with different separators - try adding a space somewhere.
A question for people experienced in such matters: is it necessary to do something about this, or is the problem sucked out of thin air and everyone is happy with everything?
Answer the question
In order to leave comments, you need to log in
I read your article and came up with a solution:
<input type="text" value="123456" dir="ltr" style="text-align: right" />
I live in Israel. The Hebrew language is RTL. Checked now, for the sake of interest. Each site dodges as best it can (I apologize in advance for a lot of pictures + put some of the large pictures under the spoiler):
www.orange.co.il/ - the site of a mobile operator - there you need to enter your phone number as a login. They allow both hyphens and spaces, and everything always looks right. Oops - this "login box" is suddenly written in Adobe Flash :-)
www.cellcom.co.il/ - site of the mobile operator No. 2 - SUDDENLY the same problem as you (this is considering that Israel has 2 state languages - Hebrew and Arabic - both RTL)
www.pelephone.co.il/ - mobile operator site No. 3 - the web form instantly erases any characters entered, except for numbers.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question