$sProcedure($part[0]); $convertedPart = str_replace("
","\r\n",$convertedPart); $convertedPart = html_entity_decode(stripcslashes($convertedPart)); $sparts[] = $convertedPart; } } $sConverted = implode(' ', $sparts); $aOutput = array( 'error' => false, 'baselang' => $sBaselang, 'tolang' => $sTolang, 'converted' => $sConverted ); } catch (GTranslateException $ge){ // Get the error message and build the ouput array $sError = $ge->getMessage(); $aOutput = array( 'error' => true, 'baselang' => $sBaselang, 'tolang' => $sTolang, 'error' => $sError ); } $ajaxoutput = ls_json_encode($aOutput). "\n";