Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Template Modifications

Reply
 
Thread Tools
Translate a single Post in a Popup w/bablefish Details »»
Translate a single Post in a Popup w/bablefish
Version: 1.00, by Scalemotorcars Scalemotorcars is offline
Developer Last Online: Aug 2022 Show Printable Version Email this Page

Category: Mini Mods - Version: 3.6.8 Rating:
Released: 07-27-2007 Last Update: Never Installs: 9
Template Edits
 
No support by the author.

Heres a small modification to this thread. Credit should go to PcFreak
https://vborg.vbsupport.ru/showthrea...=babelfish.com

Make sure you read the direction on the above post. Its a simple template change to the postbits, or postbits_legacy.

The only real changes are to the image size and I added several languages as well as direct link to bablefish so readers can translate posts back to english or whatever language your forum uses.

Make sure to change out the"your.domain_here" with your absolute path of your forum

Code:
<!--start translator-->
<a href="#" onclick="Fenster1=window.open('http://babelfish.altavista.com','','directories=no,location=no,resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=no,width=700,height=500')">
<img src="$stylevar[imgdir_button]/tr.gif" alt="Please translate all posts to English" width="15" height="10" border="0" /></a>
<!--english-->
<a href="#" onclick="Fenster1=window.open('http://babelfish.altavista.com/babelfish/urltrurl?url=http://your.domain_here/showpost.php?p=$post[postid]&lp=en_it','','directories=no,location=no,resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=no,width=600,height=400')">
<img src="$stylevar[imgdir_button]/it.gif" alt=" Translate from English to Italian" width="15" height="10" border="0" /></a>
<!--french-->
<a href="#" onclick="Fenster1=window.open('http://babelfish.altavista.com/babelfish/urltrurl?url=http://your.domain_here/showpost.php?p=$post[postid]&lp=en_fr','','directories=no,location=no,resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=no,width=600,height=400')">
<img src="$stylevar[imgdir_button]/fr.gif" alt=" Translate from English to French" width="15" height="10" border="0" /></a>
<!--german-->
<a href="#" onclick="Fenster1=window.open('http://babelfish.altavista.com/babelfish/urltrurl?url=http://your.domain_here/showpost.php?p=$post[postid]&lp=en_de','','directories=no,location=no,resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=no,width=600,height=400')">
<img src="$stylevar[imgdir_button]/de.gif" alt=" Translate from English to German" width="15" height="10" border="0" /></a>
<!--spanish-->
<a href="#" onclick="Fenster1=window.open('http://babelfish.altavista.com/babelfish/urltrurl?url=http://your.domain_here/showpost.php?p=$post[postid]&lp=en_es','','directories=no,location=no,resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=no,width=600,height=400')">
<img src="$stylevar[imgdir_button]/es.gif" alt=" Translate from English to Spanish" width="15" height="10" border="0" /></a>
<!--dutch-->
<a href="#" onclick="Fenster1=window.open('http://babelfish.altavista.com/babelfish/urltrurl?url=http://your.domain_here/showpost.php?p=$post[postid]&lp=en_nl','','directories=no,location=no,resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=no,width=600,height=400')">
<img src="$stylevar[imgdir_button]/nl.gif" alt=" Translate from English to Dutch" width="15" height="10" border="0" /></a>
<!--end translator-->
Hope this works for you its my first Mod Post.

Check the screenshots below for the images and a screenshot. :up:

Show Your Support

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

Comments
  #2  
Old 07-29-2007, 05:55 AM
PoetJA-1975's Avatar
PoetJA-1975 PoetJA-1975 is offline
 
Join Date: Sep 2006
Location: Meh...
Posts: 1,218
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow - nice mod - thanx for sharing it

Jacquii.
Reply With Quote
  #3  
Old 07-31-2007, 06:23 AM
tminus's Avatar
tminus tminus is offline
 
Join Date: Apr 2007
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I was just wondering about this 10 minutes ago! I haven't tried it yet but thank you!
Quote:
Originally Posted by MARKETPROFITS View Post
This gets mod of the month for user friendliness.

OMG! This is amazing, so amazing that I decided to enhance this a bit and make it so the entire site is translated.

Ready? Go!

In the navbar template, look for this code:

Code:
<div class="navbar" style="font-size:10pt"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_start.gif" alt="" border="0" /></a> <strong>$vboptions[bbtitle]</strong></div>
</if>
Below it, add the following code:

Code:
<!--start translator-->
<a href="#" onclick="Fenster1=window.open('http://babelfish.altavista.com','','directories=no,location=no,resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=no,width=700,height=500')">
<img src="$stylevar[imgdir_button]/tr.gif" alt="Please translate all to English" width="15" height="10" border="0" /></a>
<!--english-->
<a href="#" onclick="Fenster1=window.open('http://babelfish.altavista.com/babelfish/urltrurl?url=http://www.yoursite.com/showpost.php?p=$post[postid]&lp=en_it','','directories=no,location=no,resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=no,width=600,height=400')">
<img src="$stylevar[imgdir_button]/it.gif" alt=" Translate from English to Italian" width="15" height="10" border="0" /></a>
<!--french-->
<a href="#" onclick="Fenster1=window.open('http://babelfish.altavista.com/babelfish/urltrurl?url=http://www.yoursite.com/&lp=en_fr','','directories=no,location=no,resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=no,width=600,height=400')">
<img src="$stylevar[imgdir_button]/fr.gif" alt=" Translate from English to French" width="15" height="10" border="0" /></a>
<!--german-->
<a href="#" onclick="Fenster1=window.open('http://babelfish.altavista.com/babelfish/urltrurl?url=http://www.yoursite.com/&lp=en_de','','directories=no,location=no,resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=no,width=600,height=400')">
<img src="$stylevar[imgdir_button]/de.gif" alt=" Translate from English to German" width="15" height="10" border="0" /></a>
<!--spanish-->
<a href="#" onclick="Fenster1=window.open('http://babelfish.altavista.com/babelfish/urltrurl?url=http://www.yoursite.com/&lp=en_es','','directories=no,location=no,resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=no,width=600,height=400')">
<img src="$stylevar[imgdir_button]/es.gif" alt=" Translate from English to Spanish" width="15" height="10" border="0" /></a>
<!--dutch-->
<a href="#" onclick="Fenster1=window.open('http://babelfish.altavista.com/babelfish/urltrurl?url=http://www.yoursite.com/&lp=en_nl','','directories=no,location=no,resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=no,width=600,height=400')">
<img src="$stylevar[imgdir_button]/nl.gif" alt=" Translate from English to Dutch" width="15" height="10" border="0" /></a>
<!--end translator-->

Save it and you are done.

It should work fine...if you doesn't, please update here as I have not tested this thoroughly.

Thanks, enjoy.
Awesome, thanks. I will be trying this too.
Reply With Quote
  #4  
Old 08-01-2007, 09:28 PM
Scalemotorcars's Avatar
Scalemotorcars Scalemotorcars is offline
 
Join Date: Mar 2006
Location: NC
Posts: 619
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cool. If anyone gets the full site translation working could you please post you're results. :up:
Reply With Quote
  #5  
Old 08-03-2007, 04:19 AM
tminus's Avatar
tminus tminus is offline
 
Join Date: Apr 2007
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MARKETPROFITS View Post
I've done it and it translates the site, but not some of the post.


It looks to be about 75% of the site is translated, with some posts being translated along the way.

Either way, it is helpful because I emailed Google about this to find out how it affects Google Adsense and their reply was along the lines of "it is a good idea because we can index your site in another language which in turn can have an affect on Google Adsense."
.........Either way, the entire site translation works.
So that means that they can enable site translation and it is automatic, or do they still have to enable it per page? I thought it just translates the page, not the 'entire site'. I was working on something else but I will have to try these out.
Edit: Tried it and it works. Thanks. I see now that it opens a new window and if you stay in it the site gets translated during navigation. Awesome.

Also, having both the post and site translation would be a solution to compensate for untranslated posts in the page/site translation.
Quote:
I have 14 languages available for translation, but the Greek characteers are not displaying correctly, but I think this is because I'm in the U.S. and the dominant language is English. Whereas, I'm sure the Greek characters would appear correctly if a country's dominant language is Greek or something similar to Greek.

Who knows, my theory could be wrong.
Don't you have to have Greek characters enabled to see it properly?
http://www.perseus.tufts.edu/Help/fonthelp.html
http://www.translatum.gr/fonts/

Other ideas would be creating a Language or Translate navbar drop down menu with icons and/or text. Some people might also prefer it in the header or footer. AJAX inline post translation would be nice too, as well as translating the page without a pop-up window. And of course a full product with settings features in admincp! Dream big I say.

Edit2: Cool, thanks guys. I got it working on my navbar, postbit, header and footer. I was trying to figure out a way to have it open in the same window/tab, but no luck so far. Any ideas?
Reply With Quote
  #6  
Old 08-03-2007, 02:39 PM
RichieBoy67's Avatar
RichieBoy67 RichieBoy67 is offline
 
Join Date: Apr 2004
Location: CT - Down in a hole..
Posts: 3,057
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MARKETPROFITS View Post
This gets mod of the month for user friendliness.

OMG! This is amazing, so amazing that I decided to enhance this a bit and make it so the entire site is translated.

Ready? Go!

In the navbar template, look for this code:

Code:
<div class="navbar" style="font-size:10pt"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_start.gif" alt="" border="0" /></a> <strong>$vboptions[bbtitle]</strong></div>
</if>
Below it, add the following code:

Code:
<!--start translator-->
<a href="#" onclick="Fenster1=window.open('http://babelfish.altavista.com','','directories=no,location=no,resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=no,width=700,height=500')">
<img src="$stylevar[imgdir_button]/tr.gif" alt="Please translate all to English" width="15" height="10" border="0" /></a>
<!--english-->
<a href="#" onclick="Fenster1=window.open('http://babelfish.altavista.com/babelfish/urltrurl?url=http://www.yoursite.com/showpost.php?p=$post[postid]&lp=en_it','','directories=no,location=no,resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=no,width=600,height=400')">
<img src="$stylevar[imgdir_button]/it.gif" alt=" Translate from English to Italian" width="15" height="10" border="0" /></a>
<!--french-->
<a href="#" onclick="Fenster1=window.open('http://babelfish.altavista.com/babelfish/urltrurl?url=http://www.yoursite.com/&lp=en_fr','','directories=no,location=no,resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=no,width=600,height=400')">
<img src="$stylevar[imgdir_button]/fr.gif" alt=" Translate from English to French" width="15" height="10" border="0" /></a>
<!--german-->
<a href="#" onclick="Fenster1=window.open('http://babelfish.altavista.com/babelfish/urltrurl?url=http://www.yoursite.com/&lp=en_de','','directories=no,location=no,resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=no,width=600,height=400')">
<img src="$stylevar[imgdir_button]/de.gif" alt=" Translate from English to German" width="15" height="10" border="0" /></a>
<!--spanish-->
<a href="#" onclick="Fenster1=window.open('http://babelfish.altavista.com/babelfish/urltrurl?url=http://www.yoursite.com/&lp=en_es','','directories=no,location=no,resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=no,width=600,height=400')">
<img src="$stylevar[imgdir_button]/es.gif" alt=" Translate from English to Spanish" width="15" height="10" border="0" /></a>
<!--dutch-->
<a href="#" onclick="Fenster1=window.open('http://babelfish.altavista.com/babelfish/urltrurl?url=http://www.yoursite.com/&lp=en_nl','','directories=no,location=no,resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=no,width=600,height=400')">
<img src="$stylevar[imgdir_button]/nl.gif" alt=" Translate from English to Dutch" width="15" height="10" border="0" /></a>
<!--end translator-->

Save it and you are done.

It should work fine...if you doesn't, please update here as I have not tested this thoroughly.

Thanks, enjoy.

Thanks for that!!
Reply With Quote
  #7  
Old 08-04-2007, 08:31 AM
tminus's Avatar
tminus tminus is offline
 
Join Date: Apr 2007
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I found this nice free (lic:CC 2.5) flag pack (.zip 291kb) at famfamfam. It has Win & Mac, gif and png flag icons like the ones SMC posted but for every country::
http://www.famfamfam.com/lab/icons/flags/


*If you are a Win user and you are wondering what the .ds_store files are, they are harmless Mac files for storing a folder's custom attributes (.ds_store@wikipedia.) Feel free to delete all .ds_store files and the Mac folder if you want.
Reply With Quote
  #8  
Old 08-04-2007, 02:05 PM
Karabaja's Avatar
Karabaja Karabaja is offline
 
Join Date: Feb 2006
Posts: 101
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've placed flags next to post date-time on my board. But it would be nice if this could be in some kind of drop-down included in postbit instead of flags appearing in every post.
Reply With Quote
  #9  
Old 08-05-2007, 04:22 AM
tminus's Avatar
tminus tminus is offline
 
Join Date: Apr 2007
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Karabaja View Post
I've placed flags next to post date-time on my board. But it would be nice if this could be in some kind of drop-down included in postbit instead of flags appearing in every post.
I just took the product file for this other translation mod and put Market Profits code over it more or less. Now I have this in a drop menu menu on my forum in the navbar. This makes it way easier for so many reasons. The main one is that it is easier to have it compact in the navbar versus every post. Another is that you don't have to edit the navbar again if you revert the template during vB upgrades (unless there are conflicts.)
Reply With Quote
  #10  
Old 08-07-2007, 02:40 AM
Scalemotorcars's Avatar
Scalemotorcars Scalemotorcars is offline
 
Join Date: Mar 2006
Location: NC
Posts: 619
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

NICE!!! Good to see everyone making use of this.
Reply With Quote
Reply

Thread Tools

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 03:16 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.04910 seconds
  • Memory Usage 2,324KB
  • 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
  • (5)bbcode_code
  • (5)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
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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