Adding dynamic ltr and rtl directions inside splide js slider

144 Views Asked by At

I am using alpine js in my project. I added i18n to subpport both arabic and English languages.

when I change the language, I added this code to change all layout from ltr to rtl.

enter image description here

Splide js is working well when i have English langaue, but when I change to Arabic, it did not work.

My final goal is this: enter image description here

Note: When I add this as hard code, it works but i need to change this based on Language selection.

enter image description here

My final goal is this: enter image description here

1

There are 1 best solutions below

0
Tarik Dorhmi On

use "direction" keyword instead of "dir" in the mounting of the slider, it works for me!