
Right-to-left-language-induced GUI bugs - jan_Inkepa
https://twitter.com/_saljam/status/1255197629123878914
======
AdmiralAsshat
The fact that Arabic letters work at all on modern computers is pretty
amazing. In addition to the fact that Arabic letters connect to each other
(and so they look different in isolation versus connected), Arabic letters
change slightly in look depending on what is next to them: they have similar
but distinct forms depending on whether the letter is in the initial, medial,
or final position of the word chunk (I say "chunk" because most letters
connect to the next letter, but some do not). When writing, you usually know
what word you're trying to write, so you mentally "compose" the positions of
each letter before writing. But when typing, the computer cannot know that, so
the letter forms are constantly changing on-the-fly as you type. The program
is constantly looking at what was just typed, and whether it then needs to go
back and modify the previous letter to link properly.

~~~
abdullahkhalids
How is that technically more difficult than the program moving a half written
word to a new line if you exceed the maximum line length?

------
hamaluik
I had never really considered RTL design until I decided on a whim to support
Arabic in an app [1], and before doing so I would have easily laughed at this.
After doing so, I can completely understand it. It seems so simple—text just
goes from right to left instead of left to right, but truly grokking that
seems impossible for me. It's like riding a bike with the handlebars backwards
[2]—it just doesn't work in your brain, as much as your higher-level thoughts
seem to understand it. I was lucky that Flutter did almost all of the heavy
lifting for me, but I spent more time than I'd like to admit ironing things
out and I still don't think it's quite right.

[1] [https://github.com/hamaluik/timecop](https://github.com/hamaluik/timecop)
[2]
[https://www.youtube.com/watch?v=oI2aMKwXXnE](https://www.youtube.com/watch?v=oI2aMKwXXnE)

~~~
MarcellusDrum
First of all, thank you very much for translating the app to Arabic. There is
a huge lack of good apps in Arabic.

But I went to your website, timecop.app, and the Arabic is disastrous. Even
the name of the app is translated wrong. I didn't download the app because it
costs money and I don't really need it, but from what I saw (Name and feature
list), the Arabic needs a lot of work.

~~~
hamaluik
Thanks for checking it out! For the most part, the translations are all
automatic via Google Translate—I only speak English and “cereal box French”. I
know the quality of some translations are terrible, but for me it was more an
exercise and learning experience in localization (for example I never would
have learned about my inability to think in right-to-left had I not auto-
translated to Arabic).

The app hasn't made anywhere near enough money to warrant paying professional
translators to translate things, but if you know anyone who wants to
contribute, I'd happily take a pull request at [1]—I've already had people
submit an Italian translation, and fixes for Russian and Japanese.

[1] [https://github.com/hamaluik/timecop](https://github.com/hamaluik/timecop)

------
jan_Inkepa
For me an interesting part of this (other than slapstick value) that these are
all web-apps. In previous eras (Delphi, say), you had IIRC total separation
between “interface direction” and writing direction in labels/fields+, but
they’re a lot more coupled now that most _apps_ are really just html
_documents_ behind the scenes.

I don't know of any UI frameworks that deal with GUI in a reliably writing-
direction-agnostic way (RTL,LTR,TTB,BTT) that would allow for easy
localisation of text and layout. In principle it should be possible in CSS I
think, but I'm unaware of any guidelines for this - anyone here have any
pointers?

\+ which is also maybe a bug - often it seems you want the interface to be
mirrored between RTL and LTR apps.

~~~
baybal2
GTK+

Thanks to Behdad Esfahbod, it had very reliable layouting for exotic scripts
since 2.0 times

~~~
jan_Inkepa
Ah, cool - thanks for the reference!

I found one talk from 15 years ago where he goes into detail about it, for
anyone who's interested - [http://behdad.org/download/Presentations/bidi-
layouts/](http://behdad.org/download/Presentations/bidi-layouts/)

------
saljam
Making usable interfaces that work in a single directions is really hard.
Making them work in both is much much harder.

The bugs might be funny, but I have great respect for the programmers trying
to make their applications more accessible, be it for right-to-left languages
or otherwise.

(I wrote the linked tweets.)

------
rado
Safari's scroll snapping doesn't work in RTL at all. This industry is quite
something.

------
agluszak
I wonder why this issue isn't raised more often if it's the reality for
millions of users of RTL-written languages. Or do most of them switch the
language of web apps to English anyway? (I do - not because of bugs, but
because of missing features)

~~~
abdullahkhalids
Power structures! At least in my country, most (good) developers are more
comfortable in English, because English is the way to economic success (thanks
colonialism). These people are not really interested in doing the hard work
necessary to fix the many RTL bugs present in various programs.

For my language, Urdu, the web is far more broken than for Arabic. RTL fonts
used on most major websites are adequate for Arabic, but not for Urdu, because
the Urdu script contains additonal characters that Arabic script does not
have. Moreover, Arabic fonts are in the Naksh calligraphic style, while Urdu
speakers are more comfortable with the Nastaliq calligraphic style.

I personally use Greasemonkey to force Nastaliq fonts for RTL content on
various major websites.

------
xenophonf
Someone should show this guy apps or websites that use traditional Mongolian
writing, which is written in vertical lines:

[https://president.mn/mng/](https://president.mn/mng/)

------
dimitropoulos
if anyone is interested, I made a thing that tracks (among many other things)
RTL support in various frontend frameworks

[https://react-ui-roundup.dimitrimitropoulos.com/](https://react-ui-
roundup.dimitrimitropoulos.com/)

github: [https://github.com/dimitropoulos/react-ui-
roundup](https://github.com/dimitropoulos/react-ui-roundup)

