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 Alexandra Cernat  >  Automated Translation Class  >  index.php  >  Download  
File: index.php
Role: Example script
Content type: text/plain
Description: the index file
Class: Automated Translation Class
Translate texts with the BeGlobal API
Author: By
Last change: The class name and method name was changed
Date: 2013-10-06 15:10
Size: 628 bytes
 

Contents

Class file image Download
<?php
header
('Content-Type: text/html; charset=utf-8');

require_once 
"Automated_Translation.php";
    
$object = new Automated_Translation('AQLuJgqAJ6Rd5z88ttFEvg%3D%3D');
$text_arrays = array('title'=>'Hello World!',
                     
'description' => array('short_description' => 'This is the best class to translate',
                                            
'long_description' => 'Hello World! This is the best class to translate with SDL BeGlobal API!'));

// Example to access the translate method from Automated Translation
$result $object->translate($text_arrays,'eng','fra');
var_dump($result);
?>