Reputation: 1
I have a Shopify store and I want to change the language direction. I want to make a store that supports both Arabic and English languages, i found couple of apps that do the translation, but my problem is: I would like the store to flip its direction and text from Left to right into Right to left whenever i'm using Arabic Language , and vice versa when i choose the English language, is there something that can make this happen. PS: I started learning HTML 6 months ago. Thank you.
Upvotes: 0
Views: 750
Reputation: 1965
The best idea would be to use a theme that supports that. I believe there are many out there.
There could be manythings to change or adapt but in general what you should is
<style>
{% if localization.language.iso_code == 'ar' %}
body {
direction: rtl;
}
{% endif %}
</style>
This should be put in your head close to where you load your style. (Or if you have a .css.liquid file, there).
PS. I'm not 100% sure about the iso_code
you have, you might want to debug that value, before applying the code.
Upvotes: 0