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

Class: ArTransliteration

Source Location: /sub/ArTransliteration.class.php

Class Overview


This PHP class transliterate English words into Arabic


Author(s):

Copyright:

  • 2009 Khaled Al-Shamaa

Variables

Methods



Class Details

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



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 $_enPatterns = array('ough', 'alk', 'ois', 'sch', 'tio', 'ai', 'au', 'bb', 'cc', 'ce', 
                                      'ci', 'cy', 'ch', 'ck', 'dd', 'ea', 'ee', 'ey', 'ff', 'ge', 
                                      'gi', 'gg', 'gh', 'gn', 'ie', 'kk', 'kh', 'll', 'mm', 'nn', 
                                      'oo', 'ou', 'ph', 'pp', 'qu', 'rr', 'sh', 'ss', 'th', 'tt', 
                                      'wr', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 
                                      'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 
                                      't', 'u', 'v', 'w', 'x', 'y', 'z', ',', '?')

[line 101]



Tags:

access:  protected

Type:   mixed


[ Top ]

static $_enRegPatterns = array('/^au/', '/^a/', '/^e/', '/^i/', '/^mc/', '/^o/', '/^u/', '/^wr/', '/ough$/', '/ue$/', '/a$/', '/s$/')

[line 98]



Tags:

access:  protected

Type:   mixed


[ Top ]

static $_enRegReplacements = array('ا', 'ا', 'ا', 'ا', 'ماك', 'او', 'ا', 'ر', 'ه', '', 'ه', 'س')

[line 99]



Tags:

access:  protected

Type:   mixed


[ Top ]

static $_enReplacements = array('او', 'وك', 'وا', 'ش', 'ش', 'اي', 'او', 'ب', 'ك', 'س', 
                                          'سي', 'سي', 'تش', 'ك', 'د', 'ي', 'ي', 'اي', 'ف', 'ج', 
                                          'جي', 'غ', 'ف', 'جن', 'ي', 'ك', 'خ', 'ل', 'م', 'ن', 
                                          'و', 'و', 'ف', 'ب', 'كو', 'ر', 'ش', 'س', 'ذ', 'ت', 
                                          'ر', 'ا', 'ب', 'ك', 'د', '', 'ف', 'غ', 'ه', 'ي', 
                                          'ج', 'ك', 'ل', 'م', 'ن', 'و', 'ب', 'ك', 'ر', 'س', 
                                          'ت', 'و', 'ف', 'و', 'كس', 'ي', 'ز', '،', '؟')

[line 109]



Tags:

access:  protected

Type:   mixed


[ Top ]



Class Methods


static method arNum [line 163]

static String arNum( string $string)

Render numbers in given string using HTML entities that will show them as Indian digits (i.e. ١, ٢, ٣, 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 Arabic digits
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

string   $string   String includes some digits here or there

[ Top ]

static method en2ar [line 130]

static String en2ar( string $string, [string $outputCharset = null], [object $main = null])

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



Tags:

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


Parameters:

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

[ Top ]


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