Closed TheAwiteb closed 4 months ago
As I saw, after experimenting with writing an article in Arabic, this is the only change to support RTL
Hi Awiteb!
Thanks for this PR! I am curious: did you consider other options to implement this?
To avoid adding an extra
variable and simplify the workflow, I thought of these two options:
i18n
files (this way it'll always be accurate).What are your thoughts?
Have an internal list of RTL languages inside the tabi templates. Check if current language matches one of the list. If so, implement the body change.
I like this, so should I add it to the is_rtl
macro right?
Even though it will only be used once (as far as I can foresee), I think using the macro is a good idea, yes.
That way we can centralise the logic on one spot.
As I found, there is only 12 RTL languages which is
I'll make the is_rtl
macro return true for them
Ok, I think this is better than macros
I've made that change + minor stuff (spacing; rename variable).
Merging now.
Many thanks for your contribution!!!
Add support for RTL languages, such as Arabic and Hebrew, by adding the
dir
attribute to thebody
tag if the language is RTL.What changes did you make?
I added the
extra.rtl
andextra.lang_rtl.<lang>
to the config, with this change, we can specify the languages that are RTL and thedir
attribute will be added to thebody
tag.