PHP Classes

File: index.php

Recommend this page to a friend!
  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: 11 years ago
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);
?>