$w.onReady(function () { // Check for elements with Arabic text and set direction to rtl $('[data-lang="ar"]').css('direction', 'rtl'); });