Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
AJAX Google Translator Details »»
AJAX Google Translator
Version: 1.00, by Coroner Coroner is offline
Developer Last Online: Dec 2011 Show Printable Version Email this Page

Category: End-User Options - Version: 3.7.2 Rating:
Released: 09-04-2008 Last Update: Never Installs: 62
Template Edits Auto-Templates
Translations  
No support by the author.

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
    Quote:
    <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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 01-14-2009, 04:55 PM
soundbarrierpro soundbarrierpro is offline
 
Join Date: Nov 2007
Posts: 767
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

AWESOME! Many of my members are from Europe and Scandinavia. This is perfect!

/INSTALLED
Reply With Quote
  #33  
Old 01-17-2009, 09:20 PM
dubai2008 dubai2008 is offline
 
Join Date: Apr 2008
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To change the color of the font:
Open file: google_translate.php
$strTranslation = '<div background-color:#000000><br /><font color=#ffffff>'

change to:
$strTranslation = '<div background-color:#ffffff><br /><font color=#000000>'
The color will be black.
Reply With Quote
  #34  
Old 01-19-2009, 09:41 PM
VargTimmen VargTimmen is offline
 
Join Date: May 2008
Location: Munich - Germany
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

I installed this, because we have a few english member on our board, who need this.
The problem is, that for every marking up text, the translator pops up.
This would not be so annoying, but you can't click it away. Or set it up, if you want to occur the popup.
I need, you don't have actually much time, but it would be very great, if you can fix it.

Beside of that, the guys from the KDE Desktop Project developed an Inline Google Translation, which gives the user the opportunity to choose in which language he want to translate an entire post.

Mod
Official Live Demo
Live Demo at an Testforum by me

Could you do a similar mod for vBulletin? This would be awesome

Greetings from germany
Benny
Reply With Quote
  #35  
Old 02-02-2009, 06:21 PM
Scalemotorcars's Avatar
Scalemotorcars Scalemotorcars is offline
 
Join Date: Mar 2006
Location: NC
Posts: 619
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can someone outline the edits to get this working on VBA pages. I have allot of VBAdvanced pages and I get the google error. Maybe make the links absolute but not sure exactly where to edit so it works site wide. Thanks....
Reply With Quote
  #36  
Old 02-02-2009, 08:35 PM
Scalemotorcars's Avatar
Scalemotorcars Scalemotorcars is offline
 
Join Date: Mar 2006
Location: NC
Posts: 619
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Figured it out. Actually easy fix.

Upload the google_translate.php provided in the hack to the VBA root. Same place your cmps_index.php or index.php resides.

If you have an image folder on the root then just upload the image provided there. If not then the easy way is to an the Images Folder straight to the same root.

Done...
Works perfectly on my site. Scalemotorcar.com
Reply With Quote
  #37  
Old 02-03-2009, 01:28 PM
Scalemotorcars's Avatar
Scalemotorcars Scalemotorcars is offline
 
Join Date: Mar 2006
Location: NC
Posts: 619
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I made a few changes to the pop-up. The main difference is the ability to close the pop-up if its triggered accidental. 2nd I changed the background to class="panelsurround" to make it s bit more noticeable. This is a preference of mine but you can use whatever class looks best on your site.

Make sure you change the path to your <img src="http://www.yoursite.com/images/cross.png">.
I used the FamFamFam one. Hope this is of use to someone. Enjoy..

HTML Code:
<script type="text/javascript">
<!--
var translate_from = "en";
var translate_to   = "de";
// -->
</script>
<div id="translation" style="visibility: hidden; border: 2px; 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: 0px; position: absolute; left: 0px; top: 0px" class="tborder">
 <div class="panelsurround">
  <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);" /> <a href="#" onclick="this.parentNode.parentNode.style.visibility='hidden'"><img src="http://www.yoursite.com/images/cross.png" border=0 alt="Close Translator"></a>
 </div>
   </div>
Reply With Quote
  #38  
Old 02-03-2009, 09:49 PM
eXaLs eXaLs is offline
 
Join Date: Oct 2006
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

footer
search for

Code:
$ad_location[ad_footer_start

i can't find it
what can be problem?
Reply With Quote
  #39  
Old 02-04-2009, 01:07 AM
Scalemotorcars's Avatar
Scalemotorcars Scalemotorcars is offline
 
Join Date: Mar 2006
Location: NC
Posts: 619
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by eXaLs View Post
footer
search for

Code:
$ad_location[ad_footer_start

i can't find it
what can be problem?

Go to Admin CP > Styles & Templates> Style Manager ... Click the GO button.

In the 3rd block from the top is the footer template. Look for the very first line. It should be there. (Unless your have an older version of Vb>

If you dont have that line of code try adding it the top of the footer template. Should work fine.
Reply With Quote
  #40  
Old 02-07-2009, 11:54 AM
Scalemotorcars's Avatar
Scalemotorcars Scalemotorcars is offline
 
Join Date: Mar 2006
Location: NC
Posts: 619
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Got a little problem with, Not really a bug just a glitch.

Ive got this installed and love it. Thanks

But I also installed MK's Image resizer last night and they do both work together but when I enlarge an image with Litebox the google translator pops up at the top left of the page.

Not the entire box but just the two drop down menu's. Any ideal how to fix this.

Heres the link to MK's mod
Reply With Quote
  #41  
Old 02-10-2009, 10:56 AM
Scalemotorcars's Avatar
Scalemotorcars Scalemotorcars is offline
 
Join Date: Mar 2006
Location: NC
Posts: 619
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone have an ideal why this in conflicting with MK-Image resizer? I would hate to have to uninstall this mod just over a simple fix. Could use some help here. Thanks.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:01 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05878 seconds
  • Memory Usage 2,348KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (1)bbcode_html
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete