![]() |
Translate Your Pages Via Google
Description:
Instantly translate all vb pages that include a footer from English to german,french,italian,and spanish. Authors: Sweet22 and Antonbomb22 Credits: To google for its translation service Tested only on Vb3 Rc3 and Rc4. There may have been code changes since betas and gamma to the templates that need to be edited by this hack. If you experience difference in code please post it and ill tell you what to do;) **PLZ NOTE THAT WHEN TRANSLATING IT LOGS YOU OUT AND YOU CAN NOT LOG IN ON A TRANSLATED PAGE!** I hope to fix this issue sometime in the future, if anyone has a fix or suggestion on how to fix it is welcome;). |
spainish a english? is possible?
|
yes it is, since you requested it here it is:
Code:
<option value="es|en">Spanish to English</option> |
not bad! will install myself
MGM out |
Awesome bit of lateral thinking :) I love it
[high]* Natch clicks install :) :)[/high] |
can someone tell me what ALL possible languages are to translate to (with their code)?
thx 1000 times :D REAL COOL MOD!!! |
No Russian there, guys?>
|
sorry, google doesnt support russian at the moment but you can email them and ask them to consider it.
|
Nice mod :D but I don't get many foriegners to my boards.
|
Great mod Sweet!
I've integrated your code into a drop down menu on my showthread template. While doing this, I noticed that there's a little bug you code. Even on your site, when you translate the the site from the showthread or forumdisplay template, the threadid and forumid variables aren't passed. if you change this <input type="hidden"name="u" value="http://www.yoursite.com$translationurl"> to <input type="hidden"name="u" value="http://www.yoursite.com$translationurl?t=$threadid&f=$for uminfo[forumid]"> when you click the translation link from either pages, it will get the proper variables. Clicks install |
here are other translations not included in the instruct file:
To translate german to english add this code after the last </option> tag in your footer: Code:
<option value="de|en" selected>German to English</option> Code:
<option value="de|fr">German to French</option> Code:
<option value="es|en">Spanish to English</option> Code:
<option value="fr|en">French to English</option> Code:
<option value="fr|de">French to German</option> Code:
<option value="it|en">Italian to English</option> Code:
<option value="pt|en">Portuguese to English</option></select> |
Quote:
|
credit:
uber find in footer: Code:
<input type="hidden"name="u" value="http://www.animationation.net$translationurl"> Code:
<input type="hidden"name="u" <if condition="$translationurl=='/community/showthread.php'">value="http://www.animationation.net$translationurl?t=$threadid&f=$foruminfo[forumid]"<else />value="http://www.animationation.net$translationurl"</if>> |
Ok since there are several files that require variables i will not support problems with translating beyond index.php for now. when i release version 2 of this hack i will most likely have every .php in the forum root folder with condition until then i will not support problems with translation other than index.php.
|
Can't you just make a phpinclude hack to make new vars for the scriptname and stringvars globals, and then use those in your translationurl ?
|
Like this eg:
Change php_include to match this: Code:
$translationurl=$_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']; This will pass all query strings to the translator ... |
Sweet!
|
Quote:
|
Thanks very much for your efforts on this as it's very much needed on my board. As far as the log out problem goes, just hitting the "Back" button brings you back to a logged in page so not that big of a deal for me. A bigger problem is that it only works on pages available for guests otherwise they get a nicely translated "No permissions" page...lol Google uses frames for the translation which I suspect is part of the problem but there must be a way to pass either cookie or session info to their main frame window. I'm experimenting with it now but not overly hopeful I'll be able to figure it out. This is a good addition to my site but so close to being an excellent one.
|
Quote:
PHP Code:
HTML Code:
<input type="hidden"name="u" value="http://www.yoursite.com$translationurl"> HTML Code:
<input type="hidden" name="u" value="$vboptions[homeurl]$translationurl" /> Code:
<div align="center"> |
I get a syntax error if I try to use the XHTML portion but the big issue for me is only being about to use translation on pages not requiring a login to view (guest access). I may have to go to a commercial script in this one I guess...
|
Do you get the error when the page with the code loads, or when you attempt to submit it?
I just checked my code again, and it worked fine. Let me know, and we'll see if we can't work it out. |
It's when the page loads. The pop up error notice indicates a link to my forum directory and the line specified is the onsubmit function
|
LOL... I get an error on this page too actually (nothing to do with translation). Something about "null" is not a valid object. :confused:
|
It doesn't work for me either.
I get no translation at all http://www.tech-unity.com I just get errors Actually with the old code or the new I tryed the new code first, and right now I have the old code Still nothing Any help would be greatly appriciated |
Okay - are the errors on the resulting Google page? If so, go to YOUR site, get the source code for the page, and post the resulting code for this hack and we'll take a look (or gimme a link). It sounds like the action variable for the form might be getting set correctly.
|
tomshawk -
I looked at yours, and the code is correct, but I notice that right after the code is another </form>. When I copied just the code for this hack to a new document, it worked fine. I would say figure out why that extra </form> is in there. edit: BTW - validator.w3.org reports that as a extra </form> as well, and that there isn't an open form. I'd say comment it out and see if that fixes the problem. |
Okay - seems there was a missing closing quote in the code I posted (which is interesting, because in the code I have in my forums, it's there).
Anyways, I updated the code above. |
Quote:
Thank you, it works perfectly now ;) |
Works perfect to me :D
|
/me installs
Is it possible to add this as a cmps module? |
[high]
Quote:
:D |
help ?
|
Nothing new on this hack ? Does it runs on vb 3.0.7 ?
|
which languages?
list pls. |
I install the hack and it works for me on 3.0.7. I just do the correction added by 58sniper.
|
Anyone use this with 3.5?
|
Can be used in 3.6.1 without any problems. You only have to create a plugin with the php code to insert in the php_global hook, if it can help someone :)
I prefer the google translation a lot more than altavista one :) |
Can you explain it better ThomasR? I can't find php_global hook on adding the plug-in
|
I add in attachment my plugin for Google. This is very simple, it comes from the babelfish translation hack if I remember.
It works under 3.6.1, I think it will work the same under 3.6.2 |
All times are GMT. The time now is 09:27 AM. |
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:
|