<?php
header("Content-Type: text/html; charset=utf-8");
function translate($sora,$l) {
global $htmlorphp,$q,$QURAN,$TRANSLATE,$language,$xy,$Q_W,$folder;

//if($xy==1){ $pathx = '../'; }else{ $pathx = ''; }

$ayatnumbers = count($QURAN[$sora]);

$prints = '<div id="translateindex">';
$prints .= '<h1>'.$language[$l][2].'</h1>';
$prints .= '<div class="englishtext">'.$Q_W[20].' '.$q[$sora].' - '.$Q_W[72].' '.$ayatnumbers.'</div>';

$n=0;
for($i=1; $i<$ayatnumbers+1; $i++){
++$n;

if ($htmlorphp=="1"){ $links = "listen-".$sora."-".$i."-".$l.".html"; }else{ $links = "listen.php?sora=".$sora."&amp;aya=".$i."&amp;l=".$l.""; }
if($n==1){ $class='ayat'; }else{ $class='ayat2'; $n=0; }
if($l==16 || $l==21 || $l==30 || $l==38 || $l==40 || $l==41){ $classtranslate = 'translate_rtl'; }else{ $classtranslate = 'translate'; }

$prints .= '<div class="'.$class.'">'.Chromefix($QURAN[$sora][$i]).' <span>( '.$i.' ) <a href="'.$links.'" title="'.$language[$l][2].' '.$q[$sora].' - '.$Q_W[35].' '.$i.'" rel="gb_page_center[500, 350]"><img src="'.$pathx.''.$folder.'/icons/mp3.png" alt="'.$q[$sora].' - '.$Q_W[35].' '.$i.'" /></a></span>
<div class="'.$classtranslate.'">'.$TRANSLATE[$l][$sora][$i].'</div>
</div>';
}
$prints .= "</div>";
return $prints;
}
?>