Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: JayBachatero on July 17, 2006, 12:56:59 PM

Title: BabelfishTranslate
Post by: JayBachatero on July 17, 2006, 12:56:59 PM
Link to Mod (http://mods.simplemachines.org/index.php?mod=383)
Review this Mod (http://mods.simplemachines.org/index.php?action=review;sa=add;mod=383)

This mod will add a dropdown menu with a list of languages that you can translate the website to using Babelfish services.

Known Issues
* You can only translate one way.  Once you translate from y to x you can't go to x to y.
Title: Re: BabelfishTranslate
Post by: Gobo on July 23, 2006, 11:28:01 PM
Hi Jay

i was wondering about something. Ive been using Babelfish for my HTML file for a long time now but when I tried to use it on SMf a while back it wouldnt work and the user would get logged out once page translated.

So I was wondering how you resolved that issue?

PS: I havent tried it out yet, just curious
Title: Re: BabelfishTranslate
Post by: JayBachatero on July 24, 2006, 12:11:42 AM
I looked into it and couldn't find a way to solve the problem.  Another problem is that if you translate to lets say English -> Spanigh you can translate again.  Babefish modifies the form so I couldn't find a way around it.
Title: Re: BabelfishTranslate
Post by: Gobo on July 24, 2006, 04:47:00 AM
Yes its the same thing I experienced

However its a very useful tool all the same since even though my forum is in English mainly I have audiences from all around coming to read the articles in whatever broken up translation is available.

Very useful if someone wants to cater to wider audiences.

Title: Re: BabelfishTranslate
Post by: URPG on August 07, 2006, 06:36:06 PM
Thanks for wrapping -this (http://www.simplemachines.org/community/index.php?topic=90996.0)- i've written into a neath package. Now we simply need to solve the re-translation trouble... could we enter a line to check if the babel-fish url is already contained?
Title: Re: BabelfishTranslate
Post by: JayBachatero on August 08, 2006, 12:01:13 AM
I'll have to look into it.  The problem is that babelfish add the stuff AFTER the page is loaded.
Title: Re: BabelfishTranslate
Post by: samurai-lupin on August 31, 2006, 02:19:42 PM
I've installed the BabelfishTranslate Mod and love it. However I wanted to place it in the upper right corner of my forum (next to the PM info) in a new column.

However when I added a new colum and placed in the code (babelfishTranslate();), it would only display babelfishTranslate(); on the board but not the input field & button. What code would I need to enter to make it appear properly?

Thank you all for your thoughts and advice!


</select>
<input type="submit" value="', $txt[34], '" /><br />
<span class="middletext">', $txt['smf52'], '</span>
<input type="hidden" name="hash_passwrd" value="" />
</form>';
}

echo '

</td>

###Bablefish would need to go here####

</tr>
</table>
</td>
</tr>
</table>';
Title: Re: BabelfishTranslate
Post by: JayBachatero on August 31, 2006, 02:23:00 PM
Add this

';
babelfishTranslate();
echo '
Title: Re: BabelfishTranslate
Post by: samurai-lupin on August 31, 2006, 06:15:42 PM
Thank you works great now!
Title: Re: BabelfishTranslate
Post by: URPG on September 10, 2006, 07:42:28 AM
Any modifications that need to be done for RC3?
Title: Re: BabelfishTranslate
Post by: JayBachatero on September 10, 2006, 02:35:17 PM
No it should work on RC3.
Title: Re: BabelfishTranslate
Post by: Witte on December 12, 2006, 04:59:24 AM
Hi, I installed this on 1.1 final, and this is the error I get : Session verification failed. Please try logging out and back in again, and then try again.

Tried logging in and out, made no difference, also tried altering the database session driven option, no difference...Would be fantastic if this got working, it's a great mod...
Title: Re: BabelfishTranslate
Post by: Witte on December 12, 2006, 07:09:34 AM
can this be done by adding   sesc=' , $context['session_id'] , ' to the url in Subs.php?
Title: Re: BabelfishTranslate
Post by: valamir on December 12, 2006, 04:29:09 PM
I like the concept and would love to use it, but could you please make a .zip download link?
Title: Re: BabelfishTranslate
Post by: Witte on December 12, 2006, 04:34:54 PM
Quote from: valamir on December 12, 2006, 04:29:09 PM
I like the concept and would love to use it, but could you please make a .zip download link?

I had the same problem, but just unpack the tar.gz with winrar or whatever, it thro's an error, but look in the folder created and all is well...

Then just re zip it yourself with winzip...

[edit] this can both be done with either winzip OR winrar I would say...but I do as I just stated with the .gz mods, they all seem to be corrupted, but when you unzip them and rezip them they are ok...
Title: Re: BabelfishTranslate
Post by: PLAYBOY on December 31, 2006, 09:36:53 AM
PLEASE MAKE IT FOR RC3 1.1 - I SO MUCH NEED THIS MOD thank you...
Title: Re: BabelfishTranslate
Post by: starsong on December 31, 2006, 05:57:58 PM
OK what templete in a theme mod do the modifications go on? Plus what do I add to make teh translater button at the top of the page?
Ty so much,

Jodi
Title: Re: BabelfishTranslate
Post by: JayBachatero on January 01, 2007, 10:48:05 PM
starsong index.template.php

playboy - it should work in 1.1.
Title: Re: BabelfishTranslate
Post by: starsong on January 02, 2007, 08:39:03 PM
Quote from: JayBachatero on January 01, 2007, 10:48:05 PM
starsong index.template.php


Hmm I must not be adding it in teh right place or the right thing

I added it at the ned....
//Show the babelfish translate
   babelfishTranslate();

is that right? This is for a modified theme
Title: Re: BabelfishTranslate
Post by: JayBachatero on January 05, 2007, 12:36:42 AM
yes add it after the footer.
Title: Re: BabelfishTranslate
Post by: Greek on January 05, 2007, 06:07:53 AM
A question.
My page is in greek language and I get errors when is trying to be translated by Babelfish. Perhaps because of character encoding that I use (ISO-8859-7)? I don't know...
I must say that when my page was in UTF-8 was translated without problem.

At this moment I can translate my page only via http://www.worldlingo.com

So, the question is if I it is possible to use this mod with WordLingo.
And if yes, how?

Thanks in advance for ay answer  :)

Title: Re: BabelfishTranslate
Post by: starsong on January 05, 2007, 07:01:22 PM
Quote from: JayBachatero on January 05, 2007, 12:36:42 AM
yes add it after the footer.

OK I have added it to a bunch of places... I cant figure it out. I feel stupid...
I am adding the zip if you have time to look.
Title: Re: BabelfishTranslate
Post by: will2b on March 11, 2007, 05:52:47 PM
I have read the replys regarding adding a button to the forum for babelfish but I am new to anything regarding programing and I tried to add the mod with little success.

I am using the babylon template and cant seem to add the button on the same line as the 'search' when looking at the forum. I tried in a couple of places and just got errors or nothing. Could someone please post the actual code needed to add the button so I could just copy past.

I would need to know exactly were to added in as I am using notepad to edit the code.

I also only need english and french so how do I get rid of all the other languages?

Thank you.
Title: Re: BabelfishTranslate
Post by: Greek on March 11, 2007, 06:25:36 PM
Look at the bottom of my page. Do you mean such buttons?
For this, I use WorldLingo (I think it's better than Babelfish).
Title: Re: BabelfishTranslate
Post by: URPG on March 18, 2007, 07:06:06 AM
will2b: There is another translation mod based on the code i found... search the forum! It's working well, even with TinyPortal.

Greek: could you post the code for those flags? Or tell us how you created the links? Is it a package by world lingo?
Title: Using Bablefish Translate with other PHP Script
Post by: samurai-lupin on April 27, 2007, 02:46:21 PM
Hello,

I love my Bablefish Trabslate box on my SMF forum and therefore also wanted to use it with my new auction website at www.bulletbay.com

I have therefore modified the orginal mod code a bit and puit it in the auction's php header file. Welll, it displays but doesn't parse the actual URL to Buble Fish. So I must have made something wrong.

Could anyone please take a look at it for me and let me know what I need to modify?

This mod is so usefull. I would be sad not to be able to use it on the auction site.

Thank you for any advice,

Christian


<form action="http://babelfish.altavista.com/babelfish/urltrurl?url=' .$scripturl .'" method="post">
<input type="hidden" name="u" value="<?php echo $_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING']?>">
<select name="lp" onchange="this.form.submit();">
<option value="en_zh">English to Chinese</option>
<option value="en_nl">English to Dutch</option>
<option value="en_fr">English to French</option>
<option value="en_de">English to German</option>
<option value="en_el">English to Greek</option>
<option value="en_it">English to Italian</option>
<option value="en_ja">English to Japanese</option>
<option value="en_ko">English to Korean</option>
<option value="en_pt">English to Portuguese</option>
<option value="en_ru">English to Russian</option>
<option value="en_es">English to Spanish</option>
<option value="fr_en">French to English</option>
<option value="fr_de">French to German</option>
<option value="fr_el">French to Greek</option>
<option value="fr_it">French to Italian</option>
<option value="fr_pt">French to Portuguese</option>
<option value="fr_nl">French to Dutch</option>
<option value="fr_es">French to Spanish</option>
<option value="de_en">German to English</option>
<option value="de_fr">German to French</option>
<option value="ru_en">Russian to English</option>
<option value="es_en">Spanish to English</option>
<option value="es_fr">Spanish to French</option>
</select>
<input type="submit" value="Translate" name="btnTrUrl" />
</form>
</div>
Title: Re: BabelfishTranslate
Post by: JayBachatero on May 17, 2007, 01:51:54 AM


<input type="hidden" name="u" value="<?php echo $_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING']?>">

change to


<input type="hidden" name="u" value="', $_SERVER['PHP_SELF'], '?', $_SERVER['QUERY_STRING'], '">



I am no longer supporting this mod.  If someone wants to take over this mod please send me a PM.
Title: Re: BabelfishTranslate
Post by: KGIII on May 17, 2007, 02:00:12 AM
I'll take a look and if it isn't TOO complicated I'll PM Jay about it if no one else would like to AND it is something people would like to have still.
Title: Re: BabelfishTranslate
Post by: URPG on May 17, 2007, 04:30:08 AM
So we could start talking about this, where it originaly came from, too?
http://www.simplemachines.org/community/index.php?topic=90996.0

I'd still like to have this running and the bugs squished...
Title: Re: BabelfishTranslate
Post by: KGIII on May 17, 2007, 07:44:05 AM
It is nice to see the history. I'll take a look at it and see what I can find - it may be beyond my ability but Jay's got some good mods and I'd hate to see them die out but I've already got a bunch that I take care of.
Title: Re: BabelfishTranslate
Post by: URPG on May 17, 2007, 10:06:31 AM
It's just the original code i found and modified. Jay put it into a package, but somehow we were unable to solve the trouble with the re-translation :(
Title: Re: BabelfishTranslate
Post by: goitalone on May 17, 2007, 03:03:19 PM
I about to abandon this mod too, as it is cool up to the point where the user gets logged out.

Would be perfect (other than the font sizes being too big) if that didn't happen.

I wish there were a way around this.
Title: Re: BabelfishTranslate
Post by: goitalone on May 17, 2007, 03:06:29 PM
@URPG

Where is this other mod? I can't find anything on it.
Title: Re: BabelfishTranslate
Post by: URPG on May 17, 2007, 03:39:04 PM
I did post a link here *twice*

It's not a MOD, it's the code to make one. If you insert it by hand, it is exaclty what this mod does. we still need to solve those bugs.

As i said, i don't know much about this, i just found the code and think it's a cool idea. It can be made working, i have seen it on other Boards (vBulletin) working with similar code.
Title: Re: BabelfishTranslate
Post by: webfritz on May 20, 2007, 01:57:38 PM
Quote from: Greek on March 11, 2007, 06:25:36 PM
Look at the bottom of my page. Do you mean such buttons?

Please, can you give us a link to your site to look at?
Title: Re: BabelfishTranslate
Post by: ChaosEnergy on August 01, 2007, 06:12:07 PM
is there any news about the session logout issue?
Title: Re: BabelfishTranslate
Post by: Everyman on August 22, 2007, 03:38:21 PM
Hi, Forum failed after installing BabblefishTranslate.

Fatal error: Cannot redeclare babelfishtranslate() (previously declared in /mnt/w0301/d02/s23/b029bcdf/www/timetender.ca/enquirer/Sources/Subs.php:3583) in /mnt/w0301/d02/s23/b029bcdf/www/timetender.ca/enquirer/Sources/Subs.php on line 3622

Please help!

Title: Re: BabelfishTranslate
Post by: Everyman on August 23, 2007, 03:45:02 PM
How do I remove BabelfishTranslate via my server control panel?
Title: Re: BabelfishTranslate
Post by: TrueSatan on August 23, 2007, 05:12:06 PM
It would appear that you installed the mod twice judging by the fatal error above...furthermore you should always do a backup of your database and files prior to installing or removing any mod or theme.

You will now need to reverse the process of a manual installation of this mod making sure you remove all duplications of the edits it makes...the following links give details of the manual installation process:

Please read:

http://docs.simplemachines.org/index.php?topic=402.msg531#msg531 (http://docs.simplemachines.org/index.php?topic=402.msg531#msg531)

http://www.simplemachines.org/community/index.php?topic=34526.0 (http://www.simplemachines.org/community/index.php?topic=34526.0)

The following may also prove helpful:

http://modparser.dev.dansoftaustralia.net/ (http://modparser.dev.dansoftaustralia.net/)
Title: Re: BabelfishTranslate
Post by: Apllicmz on March 31, 2008, 02:52:00 PM
Suport 114
she work 114!
Title: Re: BabelfishTranslate
Post by: JayBachatero on April 02, 2008, 09:38:38 AM
This mod works with 1.1.4.
Title: Re: BabelfishTranslate
Post by: MoreBloodWine on October 07, 2008, 05:27:58 AM
So is this still in development ?
Title: Re: BabelfishTranslate
Post by: nay27uk on November 05, 2008, 11:38:36 AM
absolutly love this mod, however is ther anyway of getting this thing in the header area of the forum. when i installed it i didnt think anything had hapened i spent half an hour looking for it because its right down at the bottom of the forum in the footer. im the admin and if it took me half hour to spot it what hope do visiters have. i realy want this in the header area "HELP"

By the way im running V1.1.6
Title: Re: BabelfishTranslate
Post by: outsider147 on December 15, 2009, 05:15:01 PM
I ran into a problem after installing it on my forum. I'm working default in Dutch.
I installed the code in the index.template so it would appear in the menubar.
Doing this I constantly got errormessages. Reason was it didn't install in the translationmodification.
With the help of Kays I came to this conclusion.

The thing I had to do was;
open themes/default/languages/modifications.dutch.php and enter


//Babelfish translate.
$txt['select_language'] = 'selecteer van en naar andere taal';
$txt['translate'] = 'vertaal';


now everything works great.
The only thing is, I'm still looking for the fact that if you translate you can't login on the forum.
You only can read as a quest and nothing else.
Anybody knows of this problem solved?

Lars
Title: Re: BabelfishTranslate
Post by: T3CHN0 on May 04, 2011, 08:54:46 PM
Installed this mod today

error on     //Show the babelfish translate babelfishTranslate();  default index.template

my theme is blackrainv2 RC3 and i have about 200 mods installed. I expected the error but most
of the time I don't have a problem finding the correct place to make the change.

I put it before     // If the user is logged in, display stuff like their name, new messages, etc.

and tried putting it other places as well

but i don't see any button or drop down menu.

any idea's

cheers
Title: Re: BabelfishTranslate
Post by: T3CHN0 on May 04, 2011, 09:08:15 PM
sorry my bad. edit need to be like this

    //Show the babelfish translate
    babelfishTranslate();

but it don't change the forum to read in a different language just
opens a new translation window

expected something much different but I will keep the mod installed
just as an added extra

cheers