Source for file example.php

Documentation is available at example.php

  1. <?php
  2.  
  3. require_once('googleTranslate.class.php');
  4.  
  5. $gt = new GoogleTranslateWrapper();
  6.  
  7. /* Translate tedt from one language to another */
  8. $test "Bonjour de cette partie du monde";
  9. echo $gt->translate($test"en""fr");
  10.  
  11. /* Detect the language of the given text */
  12. $text "For me, it is far better to grasp
  13.         the Universe as it really is than
  14.         to persist in delusion, however
  15.         satisfying and reassuring.";
  16. print_r($gt->detectLanguage($text));
  17.  
  18.  
  19. ?>

Documentation generated on Mon, 22 Mar 2010 12:42:32 +0000 by phpDocumentor 1.4.1