Hi Mohammad,
I haven’t built a site that was right-to-left and left-to-right language compatible, but CSS does support both. I found this resource online that looks like it might be useful: Right-to-left Styling
Theoretically you should be able to generate the elements as you have done, but apply a class to the body that would change the direction of the text and layouts of the page.
-Tim