Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

m_zanjani's avatar

How to use Bootstrap 5 (RTL or LTR) based on Locale on a multilingual website?

I am planning to develop a multilingual website by Laravel 8 and Bootstrap 5. As you know, Bootstrap in version 5 has an LTR version and an RTL version. How to use the LTR version of Bootstrap when the language of the website is left to right (for example, English) and the RTL version of Bootstrap when the language of the website is right to left (for example, Persian or Arabic)?

Is it possible if I want to do this in Laravel mix?

0 likes
1 reply
ajithlal's avatar

I think you have to set the dir property on the html tag according to your locale. So if it is RTL then the html would be

<html dir='RTL'>

and LTR

<html dir='LTR'>

Please or to participate in this conversation.