Created by: malekpour
I have added right to left support by adding extra CSS rules inside .rtl
classes. This method does not affect original functionality at all, does not need additional CSS file and will be easy maintainable.
Changes have been made inside elements in less files like the following sample block:
.sample {
margin-left: 2px;
.rtl & {
margin-left: auto;
margin-right: 2px;
}
}
Also will supports dynamic layout change by adding or removing '.rtl' class from any container like body. example:
function switchLayout() {
var $body = $(document.body);
if ($body.hasClass('rtl')) {
$body.removeClass('rtl');
} else {
$body.addClass('rtl');
}
}