Login   Register  
PHP Classes
elePHPant
Icontem

File: test.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of LlorenÁ Herrera  >  Translate with Altavista Babelfish  >  test.php  >  Download  
File: test.php
Role: Example script
Content type: text/plain
Description: Usage example script
Class: Translate with Altavista Babelfish
Translates text between idioms using Babelfish
Author: By
Last change:
Date: 11 years ago
Size: 572 bytes
 

Contents

Class file image Download
<html>
<head>
    <title>Translate test</title>
</head>

<body>

<?

    
include "translate_altavista_babelfish.class.php";
    
    
$translate = new translate_babelfish_altavista;
    
    
$string "Nunca he sabido a ciencia cierta si los traductores online sirven realmente para algo ... o no ...";
    
    if(!
$translated $translate->translate($stringTRANSLATE_BABELFISH_ALTAVISTA_TRANSLATION_SPANISH_TO_ENGLISH))
        echo 
"Translation error.";
    else
    {
        echo 
"<b>Original:</b> ".$string."<br>";
        echo 
"<b>Translated:</b> ".$translated;
    }
    
?>

</body>
</html>