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

Class: I18N_Arabic_KeySwap

Source Location: /Arabic/KeySwap.php

Class Overview


This PHP class convert keyboard language programmatically (English - Arabic)


Author(s):

Copyright:

  • 2006-2016 Khaled Al-Sham'aa

Methods



Class Details

[line 96]
This PHP class convert keyboard language programmatically (English - Arabic)



Tags:

author:  Khaled Al-Sham'aa <khaled@ar-php.org>
copyright:  2006-2016 Khaled Al-Sham'aa
link:  http://www.ar-php.org
license:  LGPL


[ Top ]


Class Methods


method checkAr [line 322]

float checkAr( string $str)

Calculate the log odd probability that inserted string from keyboard is in Arabic language



Tags:

return:  Calculated score for input string as Arabic language
author:  Khaled Al-Sham'aa
access:  protected


Parameters:

string   $str   Inserted string from the keyboard

[ Top ]

method checkEn [line 275]

float checkEn( string $str)

Calculate the log odd probability that inserted string from keyboard is in English language



Tags:

return:  Calculated score for input string as English language
author:  Khaled Al-Sham'aa
access:  protected


Parameters:

string   $str   Inserted string from the keyboard

[ Top ]

method fixKeyboardLang [line 370]

string fixKeyboardLang( string $str)

This method will automatically detect the language of content supplied in the input string. It will return the suggestion of correct inserted text.

The accuracy of the automatic language detection increases with the amount of text entered.




Tags:

return:  Fixed string language and letter case to the better guess
author:  Khaled Al-Sham'aa
access:  public


Parameters:

string   $str   Inserted string from the keyboard

[ Top ]

method swapAe [line 151]

string swapAe( string $text)

Make conversion to swap that odd Arabic text by original English sentence you meant when you type on your keyboard (if keyboard language was incorrect)



Tags:

return:  Normal English string
author:  Khaled Al-Sham'aa
access:  public


Parameters:

string   $text   Odd Arabic string

[ Top ]

method swapAf [line 185]

string swapAf( string $text)

Make conversion to swap that odd Arabic text by original French sentence you meant when you type on your keyboard (if keyboard language was incorrect)



Tags:

return:  Normal French string
author:  Khaled Al-Sham'aa
access:  public


Parameters:

string   $text   Odd Arabic string

[ Top ]

method swapEa [line 168]

string swapEa( string $text)

Make conversion to swap that odd English text by original Arabic sentence you meant when you type on your keyboard (if keyboard language was incorrect)



Tags:

return:  Normal Arabic string
author:  Khaled Al-Sham'aa
access:  public


Parameters:

string   $text   Odd English string

[ Top ]

method swapFa [line 202]

string swapFa( string $text)

Make conversion to swap that odd French text by original Arabic sentence you meant when you type on your keyboard (if keyboard language was incorrect)



Tags:

return:  Normal Arabic string
author:  Khaled Al-Sham'aa
access:  public


Parameters:

string   $text   Odd French string

[ Top ]


Documentation generated on Fri, 01 Jan 2016 10:26:07 +0200 by phpDocumentor 1.4.0