CODE
<script type="text/javascript"> var Babylon_Affiliate = "CD1"; var Babylon_Language = "EN"; document.write('<div id="btrbox">');document.write('<a href="http://www.babylon.com" target="_blank">');document.write('<img src="http://online.babylon.com/trans_box/16.gif"');document.write(' alt="Babylon Online Translator" border="0"></a></div>');</script><script type="text/javascript" src="http://online.babylon.com/trans_box/js/myBabylonBox.js"></script>
Is there anyway to automatically insert into the desired text to translate what you have typed into your default language box, so that all you need to do is select what language you desire and click translate. The translated text needs to open in the same window so you can copy and paste it into your other language edit boxes.
The javascript they point to in myBabylonBox. js is as follows:
CODE
var Babylon_Affiliate;
var Babylon_Language;
var f_width = 120;
var f_height = 111;
var detect = navigator.userAgent.toLowerCase();
var OS,browser,version,total,thestring;
function checkIt(string)
{
place = detect.indexOf(string) + 1;
thestring = string;
return place;
}
if (!Babylon_Language) Babylon_Language = "EN";
if (!Babylon_Affiliate) Babylon_Affiliate = "0";
var html = document.getElementById( "btrbox" ).innerHTML;
//if( (html.substring( 0, 44) == '<a href="http://affiliates.babylon.com/z/16/' ) || (html.substring( 0, 44) == '<A href="http://affiliates.babylon.com/z/16/' )) {
// var URL = "http://online.babylon.com/trans_box/myindex.php?lang=" + Babylon_Language + "&affiliate=" + Babylon_Affiliate;
// document.write ("<iframe src='" + URL + "' height='" + f_height + "' width='" + f_width + "' FRAMEBORDER='0' marginwidth='0' marginheight='0' vspace='0' hspace='0' allowtransparency='true' scrolling='no'></iframe><BR />");
//}
//alert( html.substring( 0, 186));
//if( (html.substring( 0, 186) == '<a href="http://www.babylon.com" target="_blank"><img src="http://online.babylon.com/trans_box/16.gif" alt="Babylon Online Translator" border="0"></a>' ) || (html.substring( 0, 186) == '<A href="http://www.babylon.com" target=_blank><IMG alt="Babylon Online Translator" src="http://online.babylon.com/trans_box/16.gif" border=0></A>' ) || (html.substring( 0, 186) == '<A href="http://www.babylon.com" target=_blank><IMG alt="Babylon Online Translator" border=0 src="http://online.babylon.com/trans_box/16.gif"></A>' ) || (checkIt('opera') != 0 ) ) {
var URL = "http://online.babylon.com/trans_box/myindex.php?lang=" + Babylon_Language + "&affiliate=" + Babylon_Affiliate;
document.write ("<iframe src='" + URL + "' height='" + f_height + "' width='" + f_width + "' FRAMEBORDER='0' marginwidth='0' marginheight='0' vspace='0' hspace='0' allowtransparency='true' scrolling='no'></iframe><BR />");
//}
var Babylon_Language;
var f_width = 120;
var f_height = 111;
var detect = navigator.userAgent.toLowerCase();
var OS,browser,version,total,thestring;
function checkIt(string)
{
place = detect.indexOf(string) + 1;
thestring = string;
return place;
}
if (!Babylon_Language) Babylon_Language = "EN";
if (!Babylon_Affiliate) Babylon_Affiliate = "0";
var html = document.getElementById( "btrbox" ).innerHTML;
//if( (html.substring( 0, 44) == '<a href="http://affiliates.babylon.com/z/16/' ) || (html.substring( 0, 44) == '<A href="http://affiliates.babylon.com/z/16/' )) {
// var URL = "http://online.babylon.com/trans_box/myindex.php?lang=" + Babylon_Language + "&affiliate=" + Babylon_Affiliate;
// document.write ("<iframe src='" + URL + "' height='" + f_height + "' width='" + f_width + "' FRAMEBORDER='0' marginwidth='0' marginheight='0' vspace='0' hspace='0' allowtransparency='true' scrolling='no'></iframe><BR />");
//}
//alert( html.substring( 0, 186));
//if( (html.substring( 0, 186) == '<a href="http://www.babylon.com" target="_blank"><img src="http://online.babylon.com/trans_box/16.gif" alt="Babylon Online Translator" border="0"></a>' ) || (html.substring( 0, 186) == '<A href="http://www.babylon.com" target=_blank><IMG alt="Babylon Online Translator" src="http://online.babylon.com/trans_box/16.gif" border=0></A>' ) || (html.substring( 0, 186) == '<A href="http://www.babylon.com" target=_blank><IMG alt="Babylon Online Translator" border=0 src="http://online.babylon.com/trans_box/16.gif"></A>' ) || (checkIt('opera') != 0 ) ) {
var URL = "http://online.babylon.com/trans_box/myindex.php?lang=" + Babylon_Language + "&affiliate=" + Babylon_Affiliate;
document.write ("<iframe src='" + URL + "' height='" + f_height + "' width='" + f_width + "' FRAMEBORDER='0' marginwidth='0' marginheight='0' vspace='0' hspace='0' allowtransparency='true' scrolling='no'></iframe><BR />");
//}
If this is at all possible or if anyone knows a simple way to get translations for there descriptions etc without going to and fro between pages all the time when using multiple languages please let me know.
Regards
Mark

