While working on the easiest way to translate the OPS301 CSV files so that 
any language can be added on the fly from the original German file, I 
checked out the Google Translate APIs and here are the Links:

Two Wrappers:
1. Official: http://code.google.com/p/php-language-api/
2. Third-Party: http://code.google.com/p/gtranslate-api-php/

Here is some sample code:

======

require_once("GTranslate.php");
try{
 $gt = new Gtranslate;
       echo "Translating [Hello World] from English to German => 
".$gt->english_to_german("hello world")."<br/>";
       echo "Translating [Ciao mondo] Italian to English => 
".$gt->it_to_en("Ciao mondo")."<br/>";
 } catch (GTranslateException $ge)
 {
 echo $ge->getMessage();
}

// ====

echo "<br>";
echo "<br>";

// ====

// utf-8 is required to display characters properly
header('Content-Type: text/html; charset=utf-8');

require_once('google.translator.php');

// translate apple from english to portuguese
$str = Google_Translate_API::translate('Apple', 'pt', 'en');

// view the translated string
var_dump($str);


======

Regards,
Ap.Muthu




------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Care2002-developers mailing list
Care2002-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/care2002-developers

Reply via email to