To get LTR and RTL directions correctly we are using English for LTR and Arabic for RTL.
<?php
$textdir = ‘ltr’;
if ($_SESSION[‘lang’]==2)
{
$textdir = ‘rtl’;
}
?>
<html dir=”<?php echo $textdir?>”>
Create a page with language.php and insert following code. This page helps us to include the text for respective language.
<?php
if(!isset($_SESSION[‘lang’])){
$_SESSION[‘lang’]=1;
}
if($_SESSION[‘lang’]==1)
{
include(‘lang_en.php’);
}else if($_SESSION[‘lang’]==2)
{
include(‘lang_ar.php’);
}
?>
Recent Comments