Source for file example.php
Documentation is available at
example.php
<?php
require_once
(
'googleTranslate.class.php'
)
;
$gt
= new
GoogleTranslateWrapper
(
)
;
/* Translate tedt from one language to another */
$test
=
"Bonjour de cette partie du monde"
;
echo
$gt
->
translate
(
$test
,
"en"
,
"fr"
)
;
/* Detect the language of the given text */
$text
=
"For me, it is far better to grasp
the Universe as it really is than
to persist in delusion, however
satisfying and reassuring."
;
print_r
(
$gt
->
detectLanguage
(
$text
))
;
?>
Documentation generated on Mon, 22 Mar 2010 12:42:32 +0000 by
phpDocumentor 1.4.1