Arabic
[ class tree: Arabic ] [ index: Arabic ] [ all elements ]

Class: EnTransliteration

Source Location: /sub/EnTransliteration.class.php

Class Overview


This PHP class transliterate Arabic words into English


Author(s):

Copyright:

  • 2009 Khaled Al-Shamaa

Variables

Methods



Class Details

[line 96]
This PHP class transliterate Arabic words into English



Tags:

author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
copyright:  2009 Khaled Al-Shamaa
link:  http://www.ar-php.org
license:  LGPL


[ Top ]


Class Variables

static $_arFinePatterns = array("/'+/", "/([\- ])'/", '/(.)#/')

[line 117]



Tags:

access:  protected

Type:   mixed


[ Top ]

static $_arFineReplacements = array("'", '\\1', "\\1'\\1")

[line 118]



Tags:

access:  protected

Type:   mixed


[ Top ]

static $_arPatterns = array('ّ', 'تة', 'ته', 'كة', 'كه', 'ده', 'دة', 'ضه', 'ضة', 'سه', 'سة', 'صه', 'صة',
                                    'َا', 'َي', 'ُو', 'ِي', 'ً', 'ٌ', 'ٍ', 'َ', 'ِ', 'ُ', 
                                    'ا', 'ب', 'ت', 'ث', 'ج', 'ح', 'خ', 'د', 'ذ', 'ر', 
                                    'ز', 'س', 'ش', 'ص', 'ض', 'ط', 'ظ', 'ع', 'غ', 'ف', 
                                    'ق', 'ك', 'ل', 'م', 'ن', 'ه', 'ة', 'و', 'ي', 'ى', 
                                    'أ', 'إ', 'ء', 'ؤ', 'ئ', 'آ', 'ْ', '،', '؟')

[line 103]



Tags:

access:  protected

Type:   mixed


[ Top ]

static $_arRegPatterns = array('/^ال/','/^إِي/','/^عِي/','/^عُو/','/ْع$/', 
                                       '/ِي$/','/َو$/','/َي$/','/^ع/','/^أ/','/^آ/'         )

[line 98]



Tags:

access:  protected

Type:   mixed


[ Top ]

static $_arRegReplacements = array('Al-', 'ei', 'ei', 'ou', 'a',
                                           'i', 'aw', 'ay', 'a', 'a', 'aa')

[line 100]



Tags:

access:  protected

Type:   mixed


[ Top ]

static $_arReplacements = array('#', "t'h", "t'h", "k'h", "k'h", "d'h", "d'h", "d'h", "d'h", "s'h", "s'h", "s'h", "s'h",
                                    'a', 'a', 'ou', 'ei', 'an', 'an', 'an', 'a', 'i', 'u', 
                                    'a', 'b', 't', 'th', 'j', 'h', 'kh', 'd', 'dh', 'r', 
                                    'z', 's', 'sh', 's', 'd', 't', 'z', "'", 'gh', 'f', 
                                    'q', 'k', 'l', 'm', 'n', 'h', 'h', 'w', 'y', 'a', 
                                    "'a", 'i', "'a", "u'", "'i", "'aa", '', ',', '?')

[line 110]



Tags:

access:  protected

Type:   mixed


[ Top ]



Class Methods


static method ar2en [line 132]

static String ar2en( string $string, [string $inputCharset = null], [object $main = null])

Transliterate Arabic string into English by render them in the orthography of the English language



Tags:

return:  Out of vocabulary Arabic string in English characters
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

string   $string   Arabic string you want to transliterate
string   $inputCharset   (optional) Input charset [utf-8|windows-1256|iso-8859-6] default value is NULL (use set input charset)
object   $main   Main Ar-PHP object to access charset converter options

[ Top ]

static method enNum [line 177]

static String enNum( string $string)

Render numbers in given string using HTML entities that will show them as Arabic digits (i.e. 1, 2, 3, etc.) whatever browser language settings are (if browser supports UTF-8 character set).



Tags:

return:  Original string after replace digits by HTML entities that will show given number using Indian digits
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

string   $string   String includes some digits here or there

[ Top ]


Documentation generated on Fri, 12 Mar 2010 01:01:44 +0300 by phpDocumentor 1.4.0