PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Khaled Al-Shamaa   ArTransliteration   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example script
Class: ArTransliteration
Transliterate English text to Arabic
Author: By
Last change: Add example 2 link
Date: 17 years ago
Size: 1,830 bytes
 

Contents

Class file image Download
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html;charset=windows-1256" />
<link rel="stylesheet" type="text/css" href="style.css" media="all" />
<title>English-Arabic Transliteration</title>
</head>

<body>

<center>
<div style="width: 80%; position:absolute; left:10%; top:0%; z-index:1">
<br />
<div class="tabArea" align="center">
  <a class="tab" href="example.php">Example 1</a>
  <a class="tab" href="example2.php">Example 2</a>
  <a class="tab" href="about.html">About</a>
</div>

<div class="Paragraph">

<?php
include('ArTransliteration.class.php');
$tr = new ArTransliteration();

$en_terms = array('George Bush', 'Paul Wolfowitz', 'Silvio Berlusconi', 'Guantanamo', 'Arizona', 'Maryland',
                 
'Oracle', 'Yahoo', 'Google', 'Formula1', 'Boeing', 'Caviar', 'Telephone', 'Internet');
?>

<center>
<table border="0" cellspacing="2" cellpadding="5" width="60%">
<tr><td bgcolor="#27509D" align="center"><b><font color="#ffffff">English (sample input)</font></b></td>
<td bgcolor="#27509D" align="center"><b><font color="#ffffff" face="Tahoma">Arabic (auto generated output)</font></b></td></tr>

<?php
foreach($en_terms as $term){
    echo
'<tr><td bgcolor="#f5f5f5">'.$term.'</td>';
    echo
'<td bgcolor="#f5f5f5" align="right"><font face="Tahoma">'.$tr->en2ar($term).'</font></td></tr>';
}
?>

</table>
</center>
</div>
</center>
          <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
          </script>
          <script type="text/javascript">
          _uacct = "UA-1268287-1";
          urchinTracker();
          </script>
</body>
</html>