hi there,
I have one big problem with my translator site. It works great since 1 month ago... Now, I have a problem with it, everything I wrote, they say 'error translating'. I think that google modify some things on APIs...
So, my problem:
I have this code:
and in body:
anything I write, script say: 'error translating'
you can see online demo from my site at: translatorul.ne t/translator_en.p hp
Thanx alot
I have one big problem with my translator site. It works great since 1 month ago... Now, I have a problem with it, everything I wrote, they say 'error translating'. I think that google modify some things on APIs...
So, my problem:
I have this code:
Code:
<SCRIPT type="text/javascript" src="http://www.google.com/jsapi"></SCRIPT>
<SCRIPT type="text/javascript">
google.loader.ApiKey='ABQIAAAAnvi2UVNIq_80BAVD4Y4FGBRnHh2_6MU_2gGD9TKVUdKuJciOfRTwWuHk5M_Vqv-4A948HHgFTnsL6Q';
google.load('language','1');
google.setOnLoadCallback(init);
function init()
{
document.getElementById('done').disabled=true;
}
function del()
{
document.getElementById('text').value='';
document.getElementById('done').value='';
}
function SubmitKey(text)
{
text=text.substring(0,512);
var src=document.getElementById('src').value;
var dst=document.getElementById('dst').value;
document.getElementById('done').disabled=false;
google.language.translate(text,src,dst,function(res)
{
if(!res.error)
document.getElementById("done").value=res.translation;
else
document.getElementById("done").value='Error Translating';
}
)
}</SCRIPT>
<script src="http://maps.google.com/maps?file=api&v=2&sensor=true&key=ABQIAAAAOjTDkgSN4mqLWcSGv01YxRROwYgObTE6AqUp4nNCDsyrn4uqmhT9GaAxxiKKIISBj-9Gm7tlemyC6Q" type="text/javascript"></script>
<script src="http://www.google.com/uds/api?file=uds.js&v=1.0" type="text/javascript"></script>
<script src="http://www.google.com/uds/solutions/localsearch/gmlocalsearch.js" type="text/javascript"></script>
<script type="text/javascript">
function initialize() {
if (GBrowserIsCompatible()) {
// Create and Center a Map
var map = new GMap2(document.getElementById("map_canvas"));
map.setCenter(new GLatLng(37.4419, -122.1419), 13);
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
// bind a search control to the map, suppress result list
map.addControl(new google.maps.LocalSearch(), new GControlPosition(G_ANCHOR_BOTTOM_RIGHt new GSize(10,20)));
}
}
GSearch.setOnLoadCallback(initialize);
</script>
<script src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js" type="text/javascript"></script>
and in body:
Code:
<strong>Original text</strong><br>
<textarea onkeyup="SubmitKey(this.value)" id="text" name="textarea"></textarea>
<br>
<strong>Language Translator:</strong>
<select id="src" onchange="SubmitKey(document.getElementById('text').value)" name="select">
<option value="sq">Albanian</option>
<option value="ar">Arabic</option>
<option value="bg">Bulgarian</option>
<option value="ca">Catalan</option>
</select>
</td>
<td valign="center" width="10%">
</td>
<td align="center" width="45%">
<strong>Translation</strong><br>
<textarea id="done" disabled="disabled" name="textarea2"></textarea><br>
<strong>In language:</strong>
<select id="dst" onchange="SubmitKey(document.getElementById('text').value)" name="select">
<option value="sq">Albanian</option>
<option value="ar">Arabic</option>
<option value="bg">Bulgarian</option>
</select>
you can see online demo from my site at: translatorul.ne t/translator_en.p hp
Thanx alot