File: /home/thehunarfound/www/sms/lib/google_translation/example.php
<?php
require("GTranslate.php");
error_reporting(E_ALL);
ini_set('display_error',1);
/**
* Example using RequestHTTP
*/
$translate_string = "<p><u><em><strong>WASHINGTON</strong></em></u>: </p>
<p>Top Republican lawmaker John Boehner hinted at a potential freeze Thursday of funds for US military operations in Libya, saying White House had failed to justify its involvement. In face of Republican criticism, President Barack Obama insisted in a 30-page report to lawyers Wednesday that the current US military action in Libya was legal. And the White House argued US participation in the NATO-led assault on Moamer Kadhafi's forces did not require congressional authorization as the US role was only a supporting one. But Boehner, speaker of the Republican-controlled House of Representatives, said he was not satisfied with the administration's arguments.</p>";
try{
$gt = new Gtranslate;
echo "[HTTP] Translating [$translate_string] English to spanish => ".$gt->english_to_spanish($translate_string)."\n";
} catch (GTranslateException $ge)
{
echo $ge->getMessage();
}
?>