Closed safrilth closed 2 weeks ago
Hey. This will be awesome! Cannot use the plugin for my native language right now :( Great plugin though! Dan.
Shalom and/or salam @danzilberdan
Just to get some background, I translated a recent comment I posted using google translate:
However, when I pasted it into Obsidian the RTL didn't match:
Then when I changed the Obsidian editor setting for RTL it did display correctly:
Can we assume that this fix only needs to work Obsidian itself is set for RTL?
Are you using the Obsidian RTL Plugin
. I note that it requires the same frontmatter as per the OP:
---
direction: rtl
---
Cheers Ronny
Understood. When changing Obsidian's default direction to RTL it works. But it is not useful because I type most of my notes LTR and just some in RTL. I am using Obsidian RTL Plugin and using the frontmatter as you have written.
I've made a simple change (using the HTML dir="rtl"
mechanism) which hopefully works.
I've changed yesterday's text to be a question (with Obsidian RTL on)::
And Obsidian RTL off:
The flashcard (I think) displays correctly with this test code (Obsidian RTL off):
Note that I haven't installed the Obsidian RTL Plugin
Could you please try out this test version of plug-in. main_335A.zip
You will need to copy that to the obsidian plug-in folder, e.g.
D:\Obsidian\Obsidian\.obsidian\plugins\obsidian-spaced-repetition
Then reload the plug-in, or restart obsidian.
Note that the display of flashcards is currently hard coded for RTL (i.e. doesn't check the direction frontmatter)
Perfect! And event better if it would parse the frontmatter. Amazing!
Great that it worked. I've now added the frontmatter check so hopefully this is complete now. main_335B.zip
I've also updated the flashcard "quick edit" modal to also honor the frontmatter direction setting, so if you could please verify that that works as well.
If all ok, then I'll create the PR so that it can be merged into the next mainstream release.
Cheers Ronny
Hi @issam-seghir
I've noticed that you contributed the Arabic translation to this plug-in and thought you might be interested in the requested RTL functionality that I've implemented.
It's in beta testing at the moment, and was wondering if you would be able to test as well. The latest code is the B
version in my previous post above.
This new feature is probably only relevant if you have both LTR and RTL flashcards within the one vault, and use the direction
frontmatter attribute, as per the Obsidian RTL
Plugin.
Any feedback appreciated.
Cheers Ronny
This has been released into the latest mainstream release 1.12.5
Is your feature request related to a problem? Please describe. I use rtl plugin for some language written from right to left.. it works for editor and preview mode, but not flashcard mode..
Editor Mode :
Preview / Reading Mode :
Flashcard Mode :
Describe the solution you'd like Flashcard should be display something like Preview / Reading Mode. the solution can be something to detect if display are using RTL or not (based on frontmatters showed in editor mode above ) : if yes, then display flashcard with RTL mode activated