Anki-android: Reverse text direction (RTL) field option not respected

Created on 31 Aug 2015  Â·  10Comments  Â·  Source: ankidroid/Anki-Android

What steps will reproduce the problem?
1.Input arabic text on computer and load deck on ankidroid 2.4.3 or view on anki pc program.

What is the expected output? What do you see instead?
Desired output is arabic text RTL. Text that it output is normal.

Updated: 18:30 31.08.15
I realised the problem is with the reviewer. The cards don't show properly in it. Please see screenshot below. However in the editor (what I use to make the cards) the format is perfect.

Most helpful comment

  • Which part of the application has the problem (reviewer or editor)?
  • Have you toggled the RTL setting for the field on desktop client (Tools -> Manage Note Types... -> Fields)
    rtl
  • Do you combine RTL and LTR text in the same field?

All 10 comments

  • Which part of the application has the problem (reviewer or editor)?
  • Have you toggled the RTL setting for the field on desktop client (Tools -> Manage Note Types... -> Fields)
    rtl
  • Do you combine RTL and LTR text in the same field?

A screenshot would be helpful as well.

Thanks for the reply.

1) The problem only exists in (update: both the pc program &) the ankidroid app. In the anki pc program it works completely fine in editor.

2) I have selected the RTL setting for the field on desktop client - and that is why on the desktop client it works perfectly I believe.

3) I don't combine RTL & LTR. Even the brackets that are in the attached images are in the same direction as the text - either RTL (if front card), and LTR (if back card)

Thank you for your help. I really appreciate it.
screenshot_2015-08-31-12-56-44
pc anki working fine

I don't combine RTL & LTR

Hmm. The number “1” looks European. And Unicode notes a “directionality” different from that for, say, “١” or Arabic letters.

(The parentheses are directionally neutral, and probably not causing this.)

(I am not saying that this makes AnkiDroid’s current behavior OK. It may just be a hint to what went wrong.)

I'm not sure about the number, to my knowledge its in the same language as the arabic text (I didn't switch languages on my keyboard when I was typing it).

Also my mistake about it being a problem in only ankidroid. The problem occurs in both the PC and android version, however only in the REVIEWER (ie review mode). Very sorry about not realising this earlier.

Thank you for all your help.

Here is a screen shot describing my problem;
problemo

I think the issue is clear then. The checkbox marking a field as RTL is actually not used anywhere in AnkiDroid, and evidently not in the desktop previewer either. Shouldn't be a difficult fix I think. It would save me a lot of time if you could export that deck and send me a copy.

Okay great! I have sent you the deck.

Okay I misread reviewer as previewer (looking at your screenshot) and jumped to conclusions. What I said before was wrong. The RTL checkbox only applies to the note editor and has no effect in the reviewer. It's not meant to.

Luckily, what you are seeing is documented behaviour and you can easily fix it by modifying your template. In your case, change the front template to <div dir=rtl>{{Front}}</div>.

Problem solved. Thank you for so much for patiently helping me with my problem.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

OoDeLally picture OoDeLally  Â·  4Comments

homocomputeris picture homocomputeris  Â·  5Comments

mashinbaz1 picture mashinbaz1  Â·  6Comments

david-allison-1 picture david-allison-1  Â·  4Comments

mikehardy picture mikehardy  Â·  5Comments