Se tutto ha funzionato bene e improvvisamente non ha poi una possibilità è che avete problema con il vostro fornitore di traduzioni (gli altri sono: qualche configurazione è stato cambiato, mod aggiunte, alcuni software aggiornato).
C'è modo molto semplice per verificare avete problema con API di Google v1 o è da qualche altra parte. Per controllarla fate solo creare nuovi file php con questo contenuto:
Questo file si possono trovare in vBET pacchetto in do-not-upload/tools/googletest.php
PHP Code:
<?php
echo "Starting translation test for Google API v1<br/>\n";
$connection = curl_init();
curl_setopt($connection, CURLOPT_URL, 'http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&format=html&langpair=pl|en&q=witaj');
curl_setopt($connection, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)');
//curl_setopt($connection, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($connection, CURLOPT_RETURNTRANSFER, 1);
$time = microtime(true) * 1000;
$result = curl_exec($connection);
$time = microtime(true) * 1000 - $time;
echo 'Test result: '.$result."<br/>\n";
echo 'Test error: '.curl_error($connection)."<br/>\n";
curl_close($connection);
echo 'Connection time (ms): '.$time;
?>
Nel caso in cui l'uso di google api v2 utilizzare questo codice - anche questo file verrà incluso nella prossima versione:
PHP Code:
<?php
require_once('./global.php');
echo "Starting translation test for Google API v2<br/>\n";
$connection = curl_init();
curl_setopt($connection, CURLOPT_URL, 'https://www.googleapis.com/language/translate/v2?key='.$vbulletin->options['vbenterprisetranslator_googleapikeyv2'].'&format=html&q=witaj&target=en');
curl_setopt($connection, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)');
//curl_setopt($connection, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($connection, CURLOPT_RETURNTRANSFER, 1);
$time = microtime(true) * 1000;
$result = curl_exec($connection);
$time = microtime(true) * 1000 - $time;
echo 'Test result: '.$result."<br/>\n";
echo 'Test error: '.curl_error($connection)."<br/>\n";
curl_close($connection);
echo 'Connection time (ms): '.$time;
?>
Carica sul tuo server (root forum) e mettere URL nel browser. Se tutto è ok si ottiene risposta:
Code:
Starting transaltion test
Test result: {"responseData": {"translatedText":"Welcome"}, "responseDetails": null, "responseStatus": 200}
Test error:
Come potete vedere errori non hanno alcun valore e risultato hanno lo status di 200. Questo vuol dire: tutto è ok.
Se si dove bloccata risposta da Google sembra che:
Code:
{"responseData": null, "responseDetails": "Suspected Terms of Service Abuse, please contact ajaxapis-support@google.com.", "responseStatus": 403}
Se si dove bloccati - basta scrivere a Google come dice il messaggio. E permetterà di trovare la nostra ragione, forse è un errore, forse si dovrà cambiare qualcosa per adattarsi meglio alle TOS di Google. Ad ogni modo Google offre un facile accesso indietro quando il problema è risolto 
Se avete problemi di rete, allora risultato sarà vuoto e l'errore ti dirà ciò che sta accadendo (ad esempio: Impossibile risolvere host 'ajax.googleapis.com'). Nota in tal caso può essere un po 'prima si vedrà di uscita (fino connessione è a tempo in su).
Esempio di rete problema:
Code:
Starting translation test
Test result:
Test error: Failed to connect to 74.125.95.95: Network is unreachable
Connection time (ms): 70.96484375
Cosa si deve fare?
innanzitutto: verificare che il firewall non blocchi l'accesso a google.
in secondo luogo: si dovrebbe contatto con il vostro host provider e chiedergli problema con connessione
Se si vede solo "Avvio di prova di traduzione" o niente del tutto allora molto probabilmente non avete installato il modulo CURL in PHP.
Se si utilizza Microsoft API, creare nuovi file di php e mettere questo codice al suo interno.:
PHP Code:
<?php
require_once('./global.php');
echo "Starting translation test MS<br/>\n";
$connection = curl_init();
curl_setopt($connection, CURLOPT_URL, 'http://api.microsofttranslator.com/V2/Ajax.svc/Translate?appId='.$vbulletin->options['vbenterprisetranslator_microsoftappid'].'&from=pl&to=en&options={%22ContentType%22:%22text/html%22}&text=witaj');
curl_setopt($connection, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)');
//curl_setopt($connection, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($connection, CURLOPT_RETURNTRANSFER, 1);
$time = microtime(true) * 1000;
$result = curl_exec($connection);
$time = microtime(true) * 1000 - $time;
echo 'Test result: '.$result."<br/>\n";
echo 'Test error: '.curl_error($connection)."<br/>\n";
curl_close($connection);
echo 'Connection time (ms): '.$time;
?>
Di caricarlo sul server, nella cartella principale del forum, e mettere quel link nel tuo browser.
Si dovrebbe vedere qualcosa di simile:
PHP Code:
Starting translation test
Test result: "Hello"
Test error:
Connection time (ms): 272.083984375
Se qualcosa va storto si otterrà un errore, cioè se si mette Microsoft sbagliato ID:
PHP Code:
Starting translation test
Test result: "ArgumentException: Invalid appId Parameter name: appId xxx"
Test error:
Connection time (ms): 416.24194335938
Quanto deve incollare l'ID di Microsoft con attenzione ancora una volta
È anche possibile ottenere questo messaggio di errore (con valore ID diverso), che significa che siete bloccato da microsoft:
PHP Code:
Starting translation test MS
Test result: "InvalidOperationException: : ID=3641.V2_Json.Translate.365033CA"
Test error:
Connection time (ms): 237.756103516
In questo caso sarà necessario inviare una mail al supporto tecnico microsoft: mtcont@microsoft.com
compreso questo contenuto:
-il tuo id di traduttore API di microsoft
-completo di codice di errore, vale a dire: InvalidOperationException:: ID=3641.V2_Json.Translate.365033CA
-descrivere il problema, - quando appare, ecc.