ConvertFinglishToFarsi.php
/**
	 * ConvertFinglishToFarsi::Convert
	 *
	 * Description of function
	 *
	 * @param $finglishText string Finglish text to be converted to farsi
	 * @return string Farsi text
     */
:Convert

Description of function

@param $finglishText string Finglish text to be converted to farsi
@return string Farsi text
: Convert Description of function @param $finglishText string Finglish text to be converted to farsi @return string Farsi text
public function Convert($finglishText)
	{
		$finglishText = str_replace("'", "`", $finglishText);
		$textWords = $this->separateLatinLetters($finglishText);
		$wordShouldBeConvertedToFarsi = array();
		$lowerCaseTextWord = array();
		for ($i=0; $i < count($textWords); $i++)
		{ 
			$lowerCaseTextWord = strtolower($textWords[$i]);
			$wordShouldBeConvertedToFarsi[$i] = $this->shouldBeConvertedToFarsi($lowerCaseTextWord);
		}
		$farsiText = $this->assembleFarsiTextUsingTable($textWords, $wordShouldBeConvertedToFarsi);
		return $farsiText;
	}
public function Convert ( $ finglishText ) { $ finglishText = str_replace ( " ' " , " ` " , $ finglishText ) ; $ textWords = $ this -> separateLatinLetters ( $ finglishText ) ; $ wordShouldBeConvertedToFarsi = array ( ) ; $ lowerCaseTextWord = array ( ) ; for ( $ i = 0 ; $ i < count ( $ textWords ) ; $ i ++ ) { $ lowerCaseTextWord = strtolower ( $ textWords [ $ i ] ) ; $ wordShouldBeConvertedToFarsi [ $ i ] = $ this -> shouldBeConvertedToFarsi ( $ lowerCaseTextWord ) ; } $ farsiText = $ this -> assembleFarsiTextUsingTable ( $ textWords , $ wordShouldBeConvertedToFarsi ) ; return $ farsiText ; }
ConvertFinglishToFarsi::Convert
ConvertFinglishToFarsi :: Convert