The problem of dual languages on one card

Title: Issue with bidirectional text (Arabic + English) formatting in a single card

Content:

Hello,
I’m facing an issue when creating cards in AnkiDroid that include both Arabic (a right-to-left language) and English (a left-to-right language). When I write a question or answer that contains both languages, the formatting gets messed up, making the text hard to read or understand.

For example, if I type:
“What is the meaning of الشمس؟”
The text may appear jumbled or reversed in a confusing way inside the card.

Is there any way to fix this? Perhaps a setting for bidirectional (RTL and LTR) text support, or maybe some HTML/CSS tweaks in the card template?

I’m using the latest version of AnkiDroid on Android.
Thanks in advance for any help!strong text

Have you considered not having that in a field? You don’t really need the form-of-the-question on your card at all – when you see the vocab word, you’ll know you should translate it, right? In general, the less “noise” you have on your cards, the easier it will be to memorize what you are trying to. Or if you really think you need the “What is the meaning of” part, that should go in your card template instead (see below).

Generally, your notes will be better and more flexible if you keep separate information in separate fields, so it seems like you’ll hardly ever (or perhaps never?) need to have both languages in the same field. You can set the text direction in the editor field-by-field – Adding/Editing - Anki Manual. And you can set it in your card templates/styling for each field replacement separately – Styling & HTML - Anki Manual .

It’s a limitation of HTML (and written text in general) that you’re going to have to be careful putting LTR and RTL language on the same line, but if you want that question phrase on your template, you could do something like –

What is the meaning of?
<div dir="rtl">{{Arabicwordfield}}</div>

or

What is the meaning of <span dir="rtl">{{Arabicwordfield}}</span>?

Adding to what Danika has suggested, if it is necessary for you to have the English bit as well, use a different field for that and include it in the card template. Something like this, maybe
{{Question}}<span dir="rtl">{{Word}}

If it is the case that there is a set format for {{Question}}, but the contents of it vary (say, there are 5 possible options for the field), consider using another field to conditionally generate the card and write the Question as suggested above in a different card template. If you don’t know how to do this bit, try reading this part of the manual. Personally, I would lean towards this, but to each their own.