Page 1 of 1

how to switch HTML alignment(dir)?

Posted: Tue Aug 13, 2013 5:41 pm
by Aburajeh

Hi,

In My Project tow languages English ( Left alignment ) and Arabic ( Right alignment )

How to switch web alignment from left to right when select Arabic Language

thank you,
Aburajeh


Re: how to switch alignment?

Posted: Wed Aug 14, 2013 10:06 am
by mobhar

PHPMaker 10 uses Twitter Bootsrap. If you want to make it support for RTL, then google for "twitter bootstrap support rtl".


Re: how to switch alignment?

Posted: Wed Aug 14, 2013 3:16 pm
by Aburajeh

I am tray

Server Events > Startup Scripts Like as :

// Write your global startup script here
// document.write("page loaded");
<?php if ($gsLanguage == "ar") { // Check your id for Arabic language ?>
ew_Select("html", "*", "this.setAttribute('dir');");
<?php } ?>


Re: how to switch alignment?

Posted: Wed Aug 14, 2013 3:22 pm
by Webmaster

If v10, changing the dir attribute of the HTML tag only is not sufficient to change the direction. As mobhar wrote:

PHPMaker 10 uses Twitter Bootsrap. If you want to make it support for RTL, then google for "twitter bootstrap support rtl".

Download the *.less files that supports rtl and replace the original Bootstrap *.less files in the installed folder (e.g. C:\Program Files (x86)\PHPMaker 10\themes\bootstrap).