Make text direction RTL for languages like Arabic and Persian // add dir='auto' to all html body elements? #12
Replies: 6 comments
-
I see the same problem on Reddit, Discord, and Notion. I came across this article which suggests settings the HTML attribute
So this is another option besides using the CSS property |
Beta Was this translation helpful? Give feedback.
-
|
That's great! Will it have a dedicated script for each site of the ones mentioned (YouTube, LinkedIn, Discord, GitHub, Notion.so), or will it be for more general use? |
Beta Was this translation helpful? Give feedback.
-
|
Regarding the first solution
The CSS property I think using the HTML attribute |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
⚬ PROBLEM:
In RTL-written languages like Arabic, the text content (video titles, comments, and video descriptions) has the default text direction set to LTR when YouTube's language is English or any other LTR language. This causes the Arabic text to be unreadable in most cases, especially when it's mixed with Latin characters.
⚬ SOLUTION:
The solution to this would be by setting the CSS style
direction: rtlto the text elements mentioned above if they start with a character from an RTL-written language.⚬ ALTERNATIVES:
⚬ RELEVANCE / SCOPE:
This feature is beneficial to all YT users whose main language's script is RTL (A full list here).
⚬ "SIDE EFFECTS":
⚬ CONTEXT:
//
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions