You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that adding eng words within any Arabic sentence changes the order of the words when it appears on the site. The order of the words changes in comparison to the one in the glossary.yml. I tried to inspect the site (HTML), found it the same as glossary.yml. So, I tried removing the eng words from the translation. Personally, I think it's better to add some eng terms when explaining or defining the term. For example, when I mention python, I'd write the Arabic translation and between round bracket in English
بايثون (python)
From a little digging, we might be able to modify the template to use a yaml flag in the language pages to specify which direction the text should go using the <bdo> element.
<blockquote><pdir="rtl"><bdodir="ltr">
التعبير المنطقي عبارة عن تعبير يُستخدم لإنشاء جمل إما
<b>(true or false)</b> تحمل القيمة صح أو القية خطأ
تُتستخدم التعبيرات المنطقية مع العبارات الشرطية في محركات البحث والخوارزميات
وتُسمى التعبيرات المنطقية أيضا تعبيرات المقارنة والتعبيرات الشرطية والتعبيرات العلائقية
</bdo></p><pdir="ltr"><bdodir="rtl">
التعبير المنطقي عبارة عن تعبير يُستخدم لإنشاء جمل إما
<b>(true or false)</b> تحمل القيمة صح أو القية خطأ
تُتستخدم التعبيرات المنطقية مع العبارات الشرطية في محركات البحث والخوارزميات
وتُسمى التعبيرات المنطقية أيضا تعبيرات المقارنة والتعبيرات الشرطية والتعبيرات العلائقية
</bdo></p></blockquote>
produces this text:
التعبير المنطقي عبارة عن تعبير يُستخدم لإنشاء جمل إما
(true or false) تحمل القيمة صح أو القية خطأ
تُتستخدم التعبيرات المنطقية مع العبارات الشرطية في محركات البحث والخوارزميات
وتُسمى التعبيرات المنطقية أيضا تعبيرات المقارنة والتعبيرات الشرطية والتعبيرات العلائقية
التعبير المنطقي عبارة عن تعبير يُستخدم لإنشاء جمل إما
(true or false) تحمل القيمة صح أو القية خطأ
تُتستخدم التعبيرات المنطقية مع العبارات الشرطية في محركات البحث والخوارزميات
وتُسمى التعبيرات المنطقية أيضا تعبيرات المقارنة والتعبيرات الشرطية والتعبيرات العلائقية
The text was updated successfully, but these errors were encountered:
Brilliant! Thank you so much @zkamvar for doing all this research.
When I tried to inspect few Arabic websites, they seem to use <bdo> and <bdi> elements to fix the direction of the text.
However, in the image you provided, the text is not completely fixed. I used colored boxes and numbers to indicate the order of each part of the text. As you can see, part 2 and part 3 are swapped around.
As @BatoolMM brought up in #136:
The issue is well described in the w3 page on i18n.
There are resources for HTML and CSS solutions in https://w3c.github.io/typography/#bidi_text and https://drafts.csswg.org/css-writing-modes-3/#text-direction
From a little digging, we might be able to modify the template to use a yaml flag in the language pages to specify which direction the text should go using the
<bdo>
element.From the first test, which works in all browsers, using the above text, we can see the difference:
This HTML code:
produces this text:
The text was updated successfully, but these errors were encountered: