PrestaShop supports RTL (Right-to-Left) languages like Arabic, Hebrew, and Farsi. When an RTL language is active, PrestaShop adds a lang-rtl CSS class to the <body> tag and automatically loads RTL-specific stylesheets, allowing your theme to mirror its layout.
There are two approaches to providing RTL styles:
PrestaShop loads rtl.css (ID: theme-rtl, priority: 900) after your theme’s main stylesheets when an RTL language is active. Use this file for RTL-specific overrides.
When the shop displays an RTL language, PrestaShop automatically loads RTL variants of stylesheets if they exist. Variants are discovered by appending _rtl to the filename:
| Original | RTL variant |
|---|---|
theme.css |
theme_rtl.css |
custom.css |
custom_rtl.css |
PrestaShop can generate RTL stylesheets from your original CSS:
This generates _rtl.css files for every .css file in the theme.
_rtl.css files. Delete them first to regenerate.
The automatic RTL generation isn’t always perfect, some CSS rules may not convert correctly. To fix these issues, don’t edit the generated _rtl.css files because they will be overwritten next time you regenerate.
Instead, create a .rtlfix file with the same name as your original stylesheet. PrestaShop will append its contents to the generated RTL file automatically.
Example: your theme has assets/css/theme.css. After generation, you notice a spacing issue in assets/css/theme_rtl.css. To fix it:
assets/css/theme.rtlfix with your corrections.assets/css/theme_rtl.css.PrestaShop will generate a fresh theme_rtl.css from theme.css, then append the contents of theme.rtlfix at the end. Your fixes are preserved across regenerations.
margin-inline-start, padding-inline-end, inset-inline-start, etc.) instead of physical ones (margin-left, padding-right, left). Logical properties automatically adapt to text direction, reducing the need for RTL-specific overrides.