Warning: Use of undefined constant MDB_STRIPE_SUB_WEBHOOK_SECRET - assumed 'MDB_STRIPE_SUB_WEBHOOK_SECRET' (this will throw an Error in a future version of PHP) in /var/www/tst02/wp-content/themes/mdbootstrap4/inc/mdb-subscriptions/mdb-payments/stripe/class-mdb-stripe-webhook.php on line 26

Warning: Use of undefined constant MDB_PAYPAL_WEBHOOK_ID - assumed 'MDB_PAYPAL_WEBHOOK_ID' (this will throw an Error in a future version of PHP) in /var/www/tst02/wp-content/themes/mdbootstrap4/inc/mdb-subscriptions/mdb-payments/paypal/class-mdb-paypal-webhook.php on line 23

Notice: Undefined index: HTTP_REFERER in /var/www/tst02/wp-content/themes/mdbootstrap4/inc/cookie-setter.php on line 8



This short tutorial shows how to enable support for right-to-left text in MDB 5 across our layout, components, and utilities.

Experimental feature: The RTL feature is still experimental and will probably evolve according to user feedback.

Enable RTL

There are three requirements for enabling RTL in MDB 5:

  1. Set dir="rtl" on the element.
  2. Set an appropriate lang attribute on the element. For example: lang="ar".
  3. Include an RTL version of our CSS (mdb.rtl.min.css file).

Here is an example of a starter HTML template that implements the above requirements:

        <!DOCTYPE html>
          <html lang="ar" dir="rtl">
              <meta charset="UTF-8" />
              <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
              <meta http-equiv="x-ua-compatible" content="ie=edge" />
              <title>مرحبا بالعالم!</title>
              <!-- MDB icon -->
              <link rel="icon" href="img/mdb-favicon.ico" type="image/x-icon" />
              <!-- Font Awesome -->
              <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.11.2/css/all.css" />
              <!-- Google Fonts Roboto -->
              <!-- MDB -->
              <link rel="stylesheet" href="css/mdb.rtl.min.css" />
              <!-- Custom styles -->

            <!-- MDB -->
            <script type="text/javascript" src="js/mdb.min.js"></script>
            <!-- Custom scripts -->
            <script type="text/javascript"></script>

Directional classes

To make the class names appropriate for both LTR and RTL, we replaced direction properties like left and right to start and end respectively.

For example, instead of .ml-1, use .ms-1.

You can learn more about changes in the directional classes syntax in our migration guide.

Breadcrumb separator

The breadcrumb seperator is the only element which may require changing the SCSS variable from default $breadcrumb-divider to $breadcrumb-divider-flipped.

You can lear more about changing the breadcrumb separator in our breadcrumb documentation.