PHP Classes

File: index.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  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: 7 years ago
Size: 522 bytes


Class file image Download


// 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 = $translator->translate_URL('');

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