Login   Register  
PHP Classes
elePHPant
Icontem

File: index.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of solomongaby  >  Google Translate Tool  >  index.php  >  Download  
File: index.php
Role: Example script
Content type: text/plain
Description: example file
Class: Google Translate Tool
Translate text or Web pages using Google Translate
Author: By
Last change:
Date: 2008-07-09 14:53
Size: 522 bytes
 

Contents

Class file image Download
<?php

require('googleTranslateTool.class.php');

// initiate the translator with the settings from english to spanish, for full language list check the main class file
$translator = new googleTranslateTool('en','es');

$result $translator->translate_Text('Hello, this is a test of a translation');

if ( 
$result===false ) echo $translator->return_error();
else echo 
$result;

$result $translator->translate_URL('http://www.yahoo.com/');

if ( 
$result===false ) echo $translator->return_error();
else echo 
$result;

?>