Gossamer Forum
Home : Products : Links 2.0 : Customization :

Automatic Language Translation?

(Page 3 of 5)
> > > >
Quote Reply
Re: Automatic Language Translation? In reply to
oh.. that's cause of this script i made.. (nothing to do with translate.cgi..).. it's called wildcard.cgi and that's what allows those kind of subdomains..

like italian.pdamania.com

anyways.. i was adding some more things to it and i split up the url so i can tell.. and i forgot to put it back together..

jerry
Quote Reply
Re: Automatic Language Translation? In reply to
Sorry to bug you again, but nothin's goin to the news links... givin some crazy errors... oh, wait... that's due to a 500 error... have fun!
--Tom

[This message has been edited by garadon (edited September 26, 1999).]
Quote Reply
Re: Automatic Language Translation? In reply to
oh.. the news links are not even made yet.. well not for links2.. i at first made the news mod for links2.. but then decided to stop. .(just like all the other mods i was working on) and make it for sql..

i love sql so far.. it goes so fast..

as for the fetch error.. if you wanted to parse that to be your own error.. just add something like the one i already have right below it with the source of altavista's page. . just a small bit of it..

i guess they have 2 different kinds of fetch error pages..

jerry
Quote Reply
Re: Automatic Language Translation? In reply to
Hi Widgetz,

Is there a site where I can download the global.cgi file ?
thanks,

------------------
Ulysses Moraes
Quote Reply
Re: Automatic Language Translation? In reply to
I am still getting Internal Server Errors. I have used the codes that Bmxer provided since it is working for him. (I am using urldecode and still getting those weird characters.)

I was wondering if Bmxer or anyone else would be willing to share their COMPLETE codes.

Thanks.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Automatic Language Translation? In reply to
don't you have error logs?

the 500 error can be from the require paths being wrong.. but i doubt you would be that ignorant..

i haven't really done anything with translate.cgi.. it's not really useful.. too slow

anyways.. i made something else for the heck of it (i plan on integrating into my home page as one of those personal things)

http://www.pdamania.com/weather.cgi

it will give you the weather.. (i am going to spider out the picture, humidity, wind, etc.. but since i haven't started using it on my homepage (since my homepage is still static) i am not going to do it yet..

jerry
Quote Reply
Re: Automatic Language Translation? In reply to
Yes, I do have error logs and I have tried to check the script via telnet. Also, the urldecode stuff you provided does not work.
Check out the following URL as an example:


If you select a language and then click on Translate Link button, you will get an Internal Server Error.

I appreciate your assistance, Jerry or anyone else. Thanks.

Wink

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Automatic Language Translation? In reply to
any chance we can look at your code Wink

it would help a great deal.. it has nothing to do with urldecode.. urldecode is not catching ":" that's all is wrong with it.. but you can add it in manually.. just one line of code..

anyways.. post your code..

jerry or save as a text file

i won't be on longer tonight.. maybe for 14 more minutes..

jerry
Quote Reply
Re: Automatic Language Translation? In reply to
also.. posting what it says on your error log might be good too..

jerry
Quote Reply
Re: Automatic Language Translation? In reply to
Yeah, post your code, but if you can't get the script to run, and it runs for others, and its a new script, it could most likely be a missing bracket, after a subroutine, so try putting a bracket at the end.
Quote Reply
Re: Automatic Language Translation? In reply to
if it was a missing bracket.. i don't think the page would even load... (the ID=blah)

i think it has to do with something else..

jerry
Quote Reply
Re: Automatic Language Translation? In reply to
Yeah, your right, i didn't think about that, but its weird because when i go to just translate.cgi, it gives a 500, but with the ID its ok.
Quote Reply
Re: Automatic Language Translation? In reply to
I have saved the translate.cgi file and it is located at:

http://www.anthrotech.com/cgi/links/translate.txt

Any suggestions are greatly appreciated.

Thanks.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Automatic Language Translation? In reply to
one possible is cause you don't have an ELSE statement in the sub main.. so it pretty much does nothing if there is no ID field..

and another things is that your IF and your ELSIF is really strange..

i think.. not sure if it is what you mean.. but:

Code:
if ($in{'$db_key'}) {

should be

Code:
if ($in{'url'}) {

otherwise.. everything else looks pretty alright.. there are a lot of code that you can change to make it shorter.. but i don't want to go into it..

jerry
Quote Reply
Re: Automatic Language Translation? In reply to
Jerry,

Changing those codes allows the script to work "properly" in the sense that if you type in the following query string in the browser location, the page is translated:

Code:
http://www.anthrotech.com/cgibin/wwwvl/translate.cgi?url=http://www.anthrotech.com/&language=french

However, I am having trouble getting the web form to work to either put the URL of the link in the text box or type in their own URL.

I keep getting an error page, which I created by adding the following codes:

Code:
else {
&site_html_translate_form ("Problem Processing Form.");
}

after the if and elsif lines.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us

[This message has been edited by Eliot (edited September 25, 1999).]
Quote Reply
Re: Automatic Language Translation? In reply to
you parsed the forms 2 times... why? Smile

one in the beginning of the main and then again in translate_it..

i don't think that's a big deal.. but it's totally not needed

also.. when you use form get..

also.. this line:

Code:
$url = &urldecode($url);

what the heck are you doing there?

all that does is mess the translation with altavista up..

you have to change it to:

Code:
$url = &urlencode($url);

urldecode is for parsing the URLS on the translated page..

jerry
Quote Reply
Re: Automatic Language Translation? In reply to
Just wondering if you guys have this sorted out now? If so... where can I get a copy? Smile

Top regards,

IF.
Quote Reply
Re: Automatic Language Translation? In reply to
i did download the script but when i run
/cgi-bin/translate.cgi?url=whatever
i get invalid language where on your site i get to choose the language, what changes did you make? how many templates do i need?
Quote Reply
Re: Automatic Language Translation? In reply to
i noticed eliot made this thing work on his page, could you please explain how did you do it
Quote Reply
Re: Automatic Language Translation? In reply to
Yea...download the translate.txt file off of Widgetz's site...and then add the following link to your link.html file:

Code:
<a href="/cgi-bin/translate.cgi?url=<%URL%>">Translate Site</a>

Bmxer will have to help you with the template files.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: Automatic Language Translation? In reply to
Ask Bmxer about this.

To see the script run, you need to add the language argument, like the following:

Code:
&language=french

So, the URL should look like the following:

Code:
www.domain.com/cgi-bin/translate.cgi?url=<%URL%>&language=french

Of course the best thing to do is direct people to the choose language form since restricting the language choices in the URL would not be the best approach to running this script.

For this particular script, I am not using templates...couldn't get them to work. So, I created sub-routines in the script for the various forms and error pages.

Good luck.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------




[This message has been edited by Eliot (edited November 29, 1999).]
Quote Reply
Re: Automatic Language Translation? In reply to
Hi,

Jerry where i find one copy of your "global.cgi"?

Tanks!

------------------
[]'s

Lucas Saud - #34750464
Quote Reply
Re: Automatic Language Translation? In reply to
it looks like Bmxer is not reading this thread. should i e-mail him?
Quote Reply
Re: Automatic Language Translation? In reply to
I'm reading it, though it does look like noone has asked me anything so I don't know what i'm supposed to be replying to.
Quote Reply
Re: Automatic Language Translation? In reply to
did you make any changes to the original script? did you make make tempaltes for the script? is the script working on your site similar to eliot's site?
> > > >