![]() |
Quick "Translate This Page" Link
This modification adds a drop down box in the lower right corner of each page directly under the Forum Jump Box that is currently there. When a user selects an option from this box, they'll be forwarded on to a Google translation of the page at hand.
Please note that when viewing the translated version of this page, the user will not be logged in. In the forumjump template, look for: Code:
<br /><br /> Code:
</div> Code:
Save. Enjoy. Credit goes to oldfan (for his or her post here) that I tweaked to make work better. :D For a demo of what this looks like go here: http://f800riders.org/forum/forumdisplay.php?f=67 |
Reserved
|
This is great! why nobody is installing??? :confused:
|
Quote:
|
Whenever I translate the site, it automatically logs me out of the site and says that the admin must add the URL to the whitelist. Can you fix this issue?
|
Admin CP -> vBulletin Options -> General Settings
Add translate.google.com to the Post Referrer Whitelist. Save. |
Cool.
Our site gets visitors from around the world, so the translation will add convenience. Would be even nicer if it was more obvious to users. Would be awesome if it was near the top of the page and included country flags to indicate languages, with image linked to the correct translation. |
Quote:
Yes the flags could be a nice addition! Quote:
|
Quote:
I currently don't have vBSEO installed, is there somewhere that I can see this not working on your site? |
|
Quote:
|
Thx! Installed...
|
I dont have the double <br /> code in my template, just one. Where should I put your code at?
Code:
<div class="smallfont" style="text-align:$stylevar[left]; white-space:nowrap"> |
install
|
Warden,
I'd put it in right above the </div> and after the form end. You might need to plop a line break or two in there for it to look right. |
Quote:
|
sleeping ;), done now.
|
THANKS VERY MUCH!!!
This was just what I was looking for, surprised so few people have installed this Mark |
Quote:
|
I see from the Google Translate site that Chinese translation is supported, how do i amend the code to have English to Chinese (Simp and Trad) ?
Also would like to move the translate button from the Jump page, to somewhere higher up the page, can anyone sugguest a suitable location and the code ! Much appreicated |
Quote:
|
Adding to the post referrer whitelist doesn't prevent you from being logged out, it enables the translation to function without the the error message.
In any case, you can click on the back button and continue to be logged in. |
You might want to try placing it in the footer perhaps.
For English to Chinese (Simp & Trad) you can add these two lines: <option value="en|zh-CN">English to Chinese Simplified</option> <option value="en|zh-TW">English to Chinese Traditional</option> |
I keep getting this error.
The requested URL /scriptpath was not found on this server. |
and this..
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. |
Can anyone help me out with this? Please?
|
Did you follow the directions? Check the following line:
Code:
<input type="hidden" name="u" value="http://YOURSITE.COM/$scriptpath" /> |
I have my website in correctly, I keep trying different ways and still nothing. Which one am I supposed to be using?
http://www.mysite.com http://www.mysite.com/forum http://mysite.com http://mysite.com/forum I have tried them all and it still wont work. And I get this error as well. Apache/1.3.39 Server at streakgaming.com Port 80 |
Thanks for the Chinese bit
One question, I woul like to put the Translate option higher up the page, near the top so that people can see it without scrolling down, how do i do that? Much appreciated |
Quote:
I also entered my domain correctly, but I get a "page not found" when Google tries to translate it. How do I have to replace it correctly? Wheather <input type="hidden" name="u" value="http://www.mysite.de/forum/$scriptpath" /> nor <input type="hidden" name="u" value="http://www.mysite.de/$scriptpath" /> work. Think, the first has to work ... Does the script not know the variable $scriptpath? Thanks. Brady |
Got it. Try and error ...
<input type="hidden" name="u" value="www.mysite.de$scriptpath" /> works correctly. Brady |
Wow,
I have built it some days before and found this thread today. :) Now, If you want to remove the frame above your translated page, replace this link: http://translate.google.com/translate by http://www.google.com/translate_p. To apply for all website (php site), you can use this link http://$_SERVER[SERVER_NAME]$scriptpath: EX: <input type="hidden" name="u" value="http://$_SERVER[SERVER_NAME]$scriptpath" /> replace for <input type="hidden" name="u" value="http://YOURSITE.COM/$scriptpath" /> demo: http://www.ue-global.com (the translation at the top of the page) regards, zerokun |
Do these translated pages get indexed in the search engines?
|
Will this work if my forum is only viewable to registered members only? Also, my forum is v3.7.3
|
Quote:
I altered this mod as you directed and yes the framing is gone now. But I wonder how to allow a user to choose English again after browsing some languages, as Google shows an error page stating that English-to-English translations are not supported. With the framing the users had an option for reverting back to the original language. |
Quote:
Now, if you allow non-members to view the forum but only want to provide this translation feature to registered members, then place these lines of code around this mod's whole section of code: HTML Code:
<if condition="$bbuserinfo['userid']"> |
this looks fantastic but is the mod the same one thats on the forum now
http://f800riders.org/forum/forumdisplay.php?f=67 because that mod looks a lot better than what the code implies. im also curious to know if this bring visitors from other regions of world ? |
Quote:
|
You must have added to this mod. There's drop-down at the top left of the page as well as one to the right of the forum style chooser.
What's the code for the mod as it shows on your forum? |
is this available for vb 4 ?
|
All times are GMT. The time now is 04:59 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|