Back to vBulletin 3.7 Add-ons

AJAX Google Translator
Mod Version: 1.00, by Coroner

This modification is in the archives.
vB Version: 3.7.2 Rating: (8 votes - 4.50 average) Installs: 62
Released: 05 Sep 2008 Last Update: Never Downloads: 363
Not Supported Template Edits Auto-Template Translations  

What this MOD do ?
It will translate a marked Text - that's all.

How does it works ?
Simply mark a text and a little Textbox appears. Choose Language to translate from an to. Click "Go".

Tested on the following Browsers:
  • IE
  • Mozilla 3
  • Opera
  • Safari
How to install with TMS ?
Simply import the Product - finish !

How to install without TMS ?
Import the Product.

Now, two Templates has to be changed:
  • headinclude
    search for
    <script type="text/javascript" src="clientscript/vbulletin_global.js?v=$vboptions[simpleversion]"></script>
    add below
    Code:
    <script type="text/javascript" src="clientscript/google_translate.js"></script>
    <script type="text/javascript">
    <!--
    var GOOGLE_ERROR = "$vbphrase[googletranslator_error]";
    var GOOGLE_TEXT  = "$vbphrase[googletranslator_text_first]";
    // -->
    </script>
  • footer
    search for
    Code:
    $ad_location[ad_footer_start
    add below
    Code:
    <script type="text/javascript">
    <!--
    var translate_from = "en";
    var translate_to   = "de";
    // -->
    </script>
    <div id="translation" style="visibility: hidden; border: 1px; position: absolute; left: 0px; top: 0px" class="tborder">
     <div class="tcat">
       <a style="display: block; text-align: right; padding: 6px; font-size: 9px;" href="#" onclick="this.parentNode.parentNode.style.visibility='hidden'">$vbphrase[googletranslator_close_window]</a>
      </div>
     <div style="padding: 6px;"></div>
    </div>
    <div id="translate" style="visibility: hidden; border: 1px; position: absolute; left: 0px; top: 0px" class="tborder">
     <div class="thead">
      <img src="images/ico_searching.gif" alt="" style="vertical-align: middle; display: none;" />
      <span class="normalfont">$vbphrase[googletranslator_translate_from]:
      <select name="trans_from" onchange="translate_from=this.options[this.selectedIndex].value">
       <option value="ar">$vbphrase[googletranslator_arabic]</option>
       <option value="bg">$vbphrase[googletranslator_bulgarian]</option>
       <option value="zh-CN">$vbphrase[googletranslator_chinese]</option>
       <option value="hr">$vbphrase[googletranslator_croatian]</option>
       <option value="cs">$vbphrase[googletranslator_czech]</option>
       <option value="da">$vbphrase[googletranslator_danish]</option>
       <option value="nl">$vbphrase[googletranslator_dutch]</option>
       <option value="en" selected="selected">$vbphrase[googletranslator_english]</option>
       <option value="fi">$vbphrase[googletranslator_finnish]</option>
       <option value="fr">$vbphrase[googletranslator_french]</option>
       <option value="de">$vbphrase[googletranslator_german]</option>
       <option value="el">$vbphrase[googletranslator_greek]</option>
       <option value="hi">$vbphrase[googletranslator_hindi]</option>
       <option value="it">$vbphrase[googletranslator_italian]</option>
       <option value="ja">$vbphrase[googletranslator_japanese]</option>
       <option value="ko">$vbphrase[googletranslator_korean]</option>
       <option value="no">$vbphrase[googletranslator_norwegian]</option>
       <option value="pl">$vbphrase[googletranslator_polish]</option>
       <option value="pt">$vbphrase[googletranslator_portuguese]</option>
       <option value="ro">$vbphrase[googletranslator_romanian]</option>
       <option value="ru">$vbphrase[googletranslator_russian]</option>
       <option value="es">$vbphrase[googletranslator_spanish]</option>
       <option value="sv">$vbphrase[googletranslator_swedish]</option>
      </select>
      $vbphrase[googletranslator_translate_to]  
      <select name="trans_to" onchange="translate_to=this.options[this.selectedIndex].value">
       <option value="ar">$vbphrase[googletranslator_arabic]</option>
       <option value="bg">$vbphrase[googletranslator_bulgarian]</option>
       <option value="zh-CN">$vbphrase[googletranslator_chinese]</option>
       <option value="hr">$vbphrase[googletranslator_croatian]</option>
       <option value="cs">$vbphrase[googletranslator_czech]</option>
       <option value="da">$vbphrase[googletranslator_danish]</option>
       <option value="nl">$vbphrase[googletranslator_dutch]</option>
       <option value="en">$vbphrase[googletranslator_english]</option>
       <option value="fi">$vbphrase[googletranslator_finnish]</option>
       <option value="fr">$vbphrase[googletranslator_french]</option>
       <option value="de" selected="selected">$vbphrase[googletranslator_german]</option>
       <option value="el">$vbphrase[googletranslator_greek]</option>
       <option value="hi">$vbphrase[googletranslator_hindi]</option>
       <option value="it">$vbphrase[googletranslator_italian]</option>
       <option value="ja">$vbphrase[googletranslator_japanese]</option>
       <option value="ko">$vbphrase[googletranslator_korean]</option>
       <option value="no">$vbphrase[googletranslator_norwegian]</option>
       <option value="pl">$vbphrase[googletranslator_polish]</option>
       <option value="pt">$vbphrase[googletranslator_portuguese]</option>
       <option value="ro">$vbphrase[googletranslator_romanian]</option>
       <option value="ru">$vbphrase[googletranslator_russian]</option>
       <option value="es">$vbphrase[googletranslator_spanish]</option>
       <option value="sv">$vbphrase[googletranslator_swedish]</option>
      </select>
      </span> <input type="button" class="button" name="btngo" value="$vbphrase[googletranslator_go]" onclick="translateSelection(translate_from, translate_to, 1);" />
     </div>
    </div>
Supported Languages by Google:
  1. Arabic
  2. Bulgarian
  3. Chinese
  4. Croatian
  5. Czech
  6. Danish
  7. Dutch
  8. English
  9. Finnish
  10. French
  11. German
  12. Greek
  13. Hindi
  14. Italian
  15. Japanese
  16. Korean
  17. Norwegian
  18. Polish
  19. Portuguese
  20. Romanian
  21. Russian
  22. Spanish
  23. Swedish
Known Bugs ?
I didn't found some Bugs. Sometimes the translated Text doesn't appears, but if I marked a shorter Text, it works.

Used Queries ?
None

P.S. deutschen Support gibt es auch bei your-vb

Download

This modification is archived, downloads are still allowed.

File Type: %1$s AJAX_Google_translator.zip (10.7 KB, 395 downloads)

Screenshots

Click image for larger version
Name:	Bild 1.png
Views:	1352
Size:	46.6 KB
ID:	86585   Click image for larger version
Name:	Bild 2.png
Views:	1025
Size:	36.1 KB
ID:	86586  

Similar Mods

Miscellaneous Hacks VBA Vbadvanced CMPS Google Translator Module vBulletin 3.6 Add-ons

vblts.ru supports vBulletin®, 2022-2024