<?php
// Include the translator class
require_once('./translator.class.php');
$YourDomain = 'http://www.karatag.de';
$lg = 'de';
$gt = new translator();
$gt->setVar('url', 'http://'.$_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"]);
$gt->CurrentLanguage($lg);
$lp = $gt->langPair();
$turls = array();
if (sizeof($lp) >= 1) {
foreach ($lp as $value) {
$turls[] = $gt->setTranslateUrl($lg.'|'.$value);
}
}
// Now you can use the result
echo '<h1>Übersetze mir diese Seite bitte!</h1>';
if (sizeof($turls) > 0) {
echo '<br /><b>Übersetzung:</b><br />';
foreach ($turls as $ti => $translation) {
echo '<a href="'.$translation.'">'.$gt->languages($lp[$ti]).'</a><br />';
}
} else {
echo 'No translation for this language.';
}
exit();
?>
|