gtranslate-api-php -


GPLv3
跨平台
PHP

软件简介

这是一个PHP调用Google在线翻译服务的API。

示例代码:

 <?php  
require("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();  
 }  
?>