Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
UKBL ~ Easy Google Translator Details »»
UKBL ~ Easy Google Translator
Version: 1.00, by UKBusinessLive UKBusinessLive is offline
Developer Last Online: Feb 2012 Show Printable Version Email this Page

Category: Forum Display Enhancements - Version: 3.8.0 Rating:
Released: 01-23-2009 Last Update: Never Installs: 36
Template Edits
Re-useable Code Translations  
No support by the author.

UKBL ~ Easy Google Translator


Hi Everyone,

Made this for a friends forum and thought i'd share it here

Just a Simple Google translator which you can add to your forums, displays in a small Dropdown box in the Forum Home and posibit wrapper.



Then you can add the dropdown box in the postbit wrapper so that the option to translate is available with every post



Just click on a language and within seconds your posts is converted to a language of your choice



Your Members will be able to chose from the following,

Arabic
Chinese Simplified
Chinese Traditional
Dutch
French
German
Greek
Italian
Japanese
Korean
Russian
Spanish
Portuguese

There are loads more available, if you want any lanuage in particular, just post here and i'll add it on

Nice, So how do we add it???

1. Download the zip file with the code and instructions

2. Styles & Templates > All Style Options > Edit Template > Forum home template: FORUMHOME

Find:

Code:
$navbar
Below add:

Code:
<!-- UKBL ~ Easy Translation on forumhome -->

<DIV ALIGN=RIGHT>
<td nowrap style="border-left: 1px solid #dddddd;" align="center"> <select name="translate" style="height:20px; font-size:11px;" onchange="javascript:window.location = 'http://www.google.com/translate_c?hl=en&langpair=en%7C' + this.value + '&u=' + window.location.href;">
<option value="">Translate This Page</option>
<option value="ar">Arabic</option>
<option value="zh-CN">Chinese Simplified</option>
<option value="zh-TW">Chinese Traditional</option>
<option value="nl">Dutch</option>
<option value="fr">French</option>
<option value="de">German</option>
<option value="el">Greek</option>
<option value="it">Italian</option>
<option value="ja">Japanese</option>
<option value="ko">Korean</option>
<option value="pt">Portuguese</option>
<option value="ru">Russian</option>
<option value="es">Spanish</option> 
</select>
</DIV>

<!-- UKBL ~ Easy Translation on forumhome -->
Styles & Templates > All Style Options > Edit Template > Postbit Templates > postbit_wrapper

find

Code:
<!-- post #$post[postid] -->
Then below add

Code:
<!-- UKBL ~ Easy Translation on postbit_wrapper -->

<DIV ALIGN=CENTER>
<td nowrap style="border-left: 1px solid #dddddd;" align="center"> <select name="translate" style="height:20px; font-size:11px;" onchange="javascript:window.location = 'http://www.google.com/translate_c?hl=en&langpair=en%7C' + this.value + '&u=' + window.location.href;">
<option value="">Translate This Page</option>
<option value="ar">Arabic</option>
<option value="zh-CN">Chinese Simplified</option>
<option value="zh-TW">Chinese Traditional</option>
<option value="nl">Dutch</option>
<option value="fr">French</option>
<option value="de">German</option>
<option value="el">Greek</option>
<option value="it">Italian</option>
<option value="ja">Japanese</option>
<option value="ko">Korean</option>
<option value="pt">Portuguese</option>
<option value="ru">Russian</option>
<option value="es">Spanish</option> 
</select>
</DIV>

<!-- UKBL ~ Easy Translation on postbit_wrapper -->
Thats it, So easy and a great treat for your members

As always Please Click installed if you use this

************************** UPDATED LANGUAGE PACK *********************

Here is an updated language pack, just replace your existing ones with the ones below

Code:
<option value="ar">Arabic</option>
<option value="bg">Bulgarian</option>
<option value="zh-CN">Chinese Simplified</option>
<option value="zh-TW">Chinese Traditional</option>
<option value="hr">Croatian</option>
<option value="cs">Czech</option>
<option value="da">Danish </option>
<option value="nl">Dutch</option>
<option value="en">English</option>
<option value="fi">Finnish</option>
<option value="ph">Filipino</option>
<option value="fr">French</option>
<option value="de">German</option>
<option value="il">Hebrew</option>
<option value="el">Greek</option>
<option value="it">Italian</option>
<option value="id">Indonesian</option>
<option value="lv">Latvian</option>
<option value="lt">Lithuanian</option>
<option value="hi">Hindi</option>
<option value="ja">Japanese</option>
<option value="ko">Korean</option>
<option value="no">Norwegian</option>
<option value="pl">Polish</option>
<option value="pt">Portuguese</option>
<option value="ro">Romanian</option>
<option value="ru">Russian</option>
<option value="es">Spanish</option> 
<option value="sv">Swedish</option> 
<option value="rs">Serbian</option> 
<option value="sk">Slovak</option> 
<option value="si">Slovenian</option> 
<option value="ua">Ukrainian</option> 
<option value="vn">Vietnamese</option>
Feel Free to add or delete any you don't want, I'll add more as i get them

Please Click Installed for unlimited support

Download Now

File Type: zip Translator.zip (114.4 KB, 344 views)

Screenshots

File Type: png page1.png (43.5 KB, 0 views)
File Type: png page2.png (38.5 KB, 0 views)
File Type: png page3.png (32.9 KB, 0 views)

Show Your Support

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

Comments
  #32  
Old 02-05-2009, 12:11 PM
akvaryumforum akvaryumforum is offline
 
Join Date: Mar 2007
Location: T?rkiye
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In google translate home turkish supported, But in faq page its shown as not supported.
Reply With Quote
  #33  
Old 02-05-2009, 04:16 PM
UKBusinessLive UKBusinessLive is offline
 
Join Date: Sep 2008
Location: Essex, United Kingdom
Posts: 1,637
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by akvaryumforum View Post
In google translate home turkish supported, But in faq page its shown as not supported.
I'll look at this now and see if we can get something working for our Turkish Friends


Done it,

Right all you need to do is this

First in the code find this line

Code:
<td nowrap style="border-left: 1px solid #dddddd;" align="center"> <select name="translate" style="height:20px; font-size:11px;" onchange="javascript:window.location = 'http://www.google.com/translate_c?hl=en&langpair=en%7C' + this.value + '&u=' + window.location.href;">
<option value="">Translate This Page</option>
Now thats ok, for websites that are normally in English, But if you have a Turkish website then you'll need to change the code a little

Firstly in that line of code find the google url and the bits you need to change is in red

google . com/translate_c?hl=en&langpair=en%7C' + this.value + '&u=' + window.location.href;">

Now the en tells google your site is in english, well we need to change that to Turkish so change that for tr, the 2 letter country code for Turkey

So now your code should look something like...

Code:
<td nowrap style="border-left: 1px solid #dddddd;" align="center"> <select name="translate" style="height:20px; font-size:11px;" onchange="javascript:window.location = 'http://www.google.com/translate_c?hl=tr&langpair=tr%7C' + this.value + '&u=' + window.location.href;">
<option value="">Translate This Page</option>
Thats the first bit, secondly we need to add Turkish to the list of options so at the bottom, Below spanish, add a new option line for our Turkish Translation like this...

Code:
<option value="tr">Turkish</option>
Once you've done that, save and refresh your site, you'll be able to translate Turkish to the world

Enjoy :up:
Reply With Quote
  #34  
Old 02-05-2009, 07:15 PM
akvaryumforum akvaryumforum is offline
 
Join Date: Mar 2007
Location: T?rkiye
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks
Reply With Quote
  #35  
Old 02-05-2009, 10:10 PM
Fungsten's Avatar
Fungsten Fungsten is offline
 
Join Date: Jul 2006
Posts: 1,131
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Fungsten View Post

BUT, when clicking on translate I have to log back in again then it shows no translation; even though it says that it is the translation. TIA.

Bump.
Reply With Quote
  #36  
Old 02-06-2009, 05:00 AM
UKBusinessLive UKBusinessLive is offline
 
Join Date: Sep 2008
Location: Essex, United Kingdom
Posts: 1,637
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Fungsten View Post
Bump.
Sorry Buddy, Must of forgotten about you

Tell me a bit more of what your trying to do?? What country are you in?? and where you've added your code.

What languages are you translating to show you that error???

Perhaps a link would allow me to see the problem first hand, PM me if you do not want to post the link, but prefer to send it to me.

Thanks, we'll try and sort this for you today
Reply With Quote
  #37  
Old 02-06-2009, 10:33 AM
compact123 compact123 is offline
 
Join Date: Jun 2006
Posts: 235
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks for turkish suupport sir

good luck...
Reply With Quote
  #38  
Old 02-06-2009, 04:36 PM
Fungsten's Avatar
Fungsten Fungsten is offline
 
Join Date: Jul 2006
Posts: 1,131
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by UKBusinessLive View Post
Sorry Buddy, Must of forgotten about you

Tell me a bit more of what your trying to do?? What country are you in?? and where you've added your code.

What languages are you translating to show you that error???

Perhaps a link would allow me to see the problem first hand, PM me if you do not want to post the link, but prefer to send it to me.

Thanks, we'll try and sort this for you today
Check your PMs.
Reply With Quote
  #39  
Old 02-06-2009, 05:07 PM
UKBusinessLive UKBusinessLive is offline
 
Join Date: Sep 2008
Location: Essex, United Kingdom
Posts: 1,637
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Fungsten View Post
Check your PMs.
Have Replied
Reply With Quote
  #40  
Old 02-08-2009, 10:35 AM
Winterworks Winterworks is offline
 
Join Date: Feb 2008
Location: Canada
Posts: 640
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow, Uk!

I'm starting to really love your work mate...

My new forum software, this would be perfect as a language chooser, as it translates everything.

Thank you mate
[high]* Winterworks installs[/high]
Reply With Quote
  #41  
Old 02-08-2009, 01:03 PM
lgnd's Avatar
lgnd lgnd is offline
 
Join Date: Jun 2007
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed thanks! How can add this into the navbar? 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 12: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.07362 seconds
  • Memory Usage 2,361KB
  • Queries Executed 26 (?)
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
  • (8)bbcode_code
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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
  • (4)postbit_attachment
  • (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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete