|
Project Information
Featured
Links
|
NOTICEThis lib is not supported officially by Google, it was developed by a PHP developer that is not related with Google in any mater. You need to comply with Google terms of use for the Ajax Language Translate api (http://code.google.com/apis/ajaxlanguage/terms.html) GTranslateGoogle Translate™ API PHP Wrapper AboutPHP library that wraps the Google Translate™ API. Translates a phrase from one language to another. DownloadGTranslate 0.7.9.1 ChangeLog- 0.7.9.1 13 2011
- Removed ' from languages.v2.ini in order to manage compatibility with php < 5.3
- Added more examples into example.php
- 0.7.9 13 2011
- Applied improvements sent by (Azhari Harahap)
- Removing notice Notice: Undefined index: HTTP_REFERER when runing script from console
- Created a setLanguageFile($file) method to define language file to use
- 0.7.8 21 2010:
- Fixed issues on languages file 35
- 0.7.7:
- Updated languages file, issue 28
- Updated version on GTranslate.php, issue 29
- Fixed the issue that was preventing Nowergian translation to be done, issue 26
- Added Referrer parameter setter, issue 22
- 0.7.6:
- - Bug fixing
- Afrikaans support fix, issue 24
- - Added functionalities
- Irish support, issue 16
- userip parameter supported, issue 17
- 0.7.5:
- - Adding Lib into zip file, no code changes, issue [9,13]
- 0.7.4:
- - Fixed Warning when no $SERVER['HTTP_REFERER'] is set, issue 5
- 0.7.3:
- - Fixed requestCurl method in order to allow POST action, this way you can translate bigger chunks of text
- 0.7.2:
- - Added support for Google Translate api key parameter
- 0.7.1:
- - Added TM to protected brand word
- 0.7.0 (11/01/2009):
- - Initial release for the Google Translate™ API PHP Wrapper
Usage<?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();
}
?>
|