PDA

View Full Version : Solved Translations not working at all!



moman
14-02-10, 08:49
For some (most) translated languages, a lot of strings are missing in the translated versions on my forum. You can check this as a guest. What's the deal?

moman
14-02-10, 22:46
Changed API key to one with just my domain and it works now.

vBET
15-02-10, 12:35
Great to hear :)

moman
16-03-10, 00:48
Ok, now I'm getting this problem again, with and without a key. It only works from time to time. At what e-mail can I contact Google?

moman
16-03-10, 19:46
I found the e-mail and contacted google. They advised me that a new 'userip' parameter has been added to the API and should be used by large sites.

I thus changed line 214 in vBet_functions.php to: return 'http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&format=html&langpair='.$from.'|'.$to.'&key='.$vbulletin->options['vbenterprisetranslator_googleapikey'].'&userip='.IP ADDRESS;

While requiring global.php to get the IP ADDRESS.

vBET
17-03-10, 01:00
We have it already implemented - waiting for new release. userip is not obligatory that is why we have no hurry with that. We will made new vBET 3.x release after vBET4.x will be stable and we will be able to move algorithm enhancements to vBET 3.x :)

If you want to have it faster, then please change function vbet_getTranslationURL in /includes/vbenterprisetranslator_functions.php to this one:


function vbet_getTranslationURL($from,$to) {
global $vbulletin;
if ($vbulletin->options['vbenterprisetranslator_googleapikey']) {
return 'http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&format=html&langpair='.$from.'|'.$to.'&key='.$vbulletin->options['vbenterprisetranslator_googleapikey'].'&userip='.$_SERVER['REMOTE_ADDR'];
} else {
return 'http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&format=html&langpair='.$from.'|'.$to.'&userip='.$_SERVER['REMOTE_ADDR'];
}
}

moman
17-03-10, 01:54
Thanks! Due to size of my site, requests without userip were mostly being blocked.

vBET
17-03-10, 18:22
Sorry for confusion - I checked code from old version. In vBET3.3.1 userip is already included in request :)

AfrikaansAlbanianArabicBelarusianBulgarianCatalanChineseCroatianCzechDanishDutchEnglishEstonianFilipinoFinnishFrenchGalicianGermanGreekHaitian CreoleHebrewHindiHungarianIcelandicIndonesianIrishItalianJapaneseKoreanLatvianLithuanianMacedonianMalayMalteseNorwegianPersianPolishPortugueseRomanianRussianSerbianSlovakSlovenianSpanishSwahiliSwedishTaiwaneseThaiTurkishUkrainianVietnameseWelshYiddish
Translated to other languages supported by vB Enterprise Translator PRODUCER_PRODUCT_VERSION