Gossamer Forum
Home : Products : Links 2.0 : Customization :

Automatic Language Translation?

(Page 4 of 5)
> > > >
Quote Reply
Re: Automatic Language Translation? In reply to
Not many changes, I only use one template for the regular page, and error page, and i don't think mines is like Eliots usage wise, though it could be. Mines like i said uses a template and doesn't print the page from the cgi.
Quote Reply
Re: Automatic Language Translation? In reply to
Bmxer's script is nicer because it works with one template file. My script includes many sub-routines for the different error messages. Not very pretty to say the least.

Wink

Regards,

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


Quote Reply
Re: Automatic Language Translation? In reply to
would you care to share the templates and the small changes you made to the script?
Quote Reply
Re: Automatic Language Translation? In reply to
Hey, sorry for not replying sooner, I've been busy with a History project. I changed it to use one template, which also has an <%if error%> <%error%> <%endif%> thing, to process errors. I added the Spanish to English, Italian to English, and so on... , and i added the other types of errors Altavista has so it now doesn't leave my site with an error. AKA, Frame Error, and Fetch Error which in the script is written as Fetch error. I put the template code up by tomorrow, and also the cgi code.
Quote Reply
Re: Automatic Language Translation? In reply to
Great! i can not wait to see it.
thank you!!!
Quote Reply
Re: Automatic Language Translation? In reply to
Ok, its up at my mod site -
Remember, the original code is Widgetz, I just have some modifications.

http://lookhard.hypermart.net/links-mods/
Quote Reply
Re: Automatic Language Translation? In reply to
i deleted my /sql directory today because i no longer need those scripts in there.. (links 2.0 modded to SQL).. since i HAVE links sql..

so you'll have to find another source for translate.cgi.. please keep in mind though i have a new version of translate.cgi coming.. it includes all the fixes of the previous version that HAS NOT been fixed yet..

jerry
Quote Reply
Re: Automatic Language Translation? In reply to
Greetings All!

Works for me ! Only thing is I get the same issue as theguy!

Quote:
Content-type: text/html



------------------
www.nzcid.godzone.net.nz
New Zealand Christian Internet Directory




Quote Reply
Re: Automatic Language Translation? In reply to
Okay...I am getting somewhere. I changed $in{'url'} to $in{'URL'} and NOW the only thing that prints in the input blank is http://.

Any ideas?

Regards,

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


Quote Reply
Re: Automatic Language Translation? In reply to
wonderfull mode, I LOVE IT Smile
thank you guys!!!

1 little problem though,
at the beginning of the page i see
Content-type: text/html

and when i remove it, the script does not work. is there a way around this
Quote Reply
Re: Automatic Language Translation? In reply to
Widgetz,
Will it be like Altavista and have your global.cgi mixed with it so it can do both functions? That would be neat.

theguy,
I'll look into it. Oh, i forgot to say what to put into link.html, i'll add that too.
Quote Reply
Re: Automatic Language Translation? In reply to
Bmxer,

I can't get the form to work properly. Is your URL field case sensitive (url) in your links.def file? I tried using both value="<%url%>" and value="<%URL%>" for the input blank (although I changed it to a text box). And I keep getting a fetch error and the URL does not appear in the text box.

Here is the complete codes I am using for the text box:

Code:
<textarea name="url" value="<%URL%>" rows="6" wrap=virtual cols="56"></textarea>

Any ideas or suggestions?

Also, about linking it from the link.html template file, I am using the following codes:

Code:
<a href="<%db_cgi_url%>/translate.cgi?url=<%URL%>">Translate Link</a>

Regards,



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




[This message has been edited by Eliot (edited December 05, 1999).]
Quote Reply
Re: Automatic Language Translation? In reply to
translate.cgi v2 allows what global.cgi does.. yes.. it's written in strict so it's better (links 2.0 users will need to comment that line)

also.. i remade from scratch that spider.cgi and this time i know i'm going to redistribute it.. it's much better..

plus it works with SQL so it's fast..

and i am no longer using LWP to do all this stuff.. i am able to retrieve the last modified time, content-type, document length, and the language of the file..

right now i have it working on flatfile using grep and it's more stable than the original one.. I don't want to put in on SQL for demo cause I will probably go over my 35 mb limit

jerry
Quote Reply
Re: Automatic Language Translation? In reply to
Content-type: text/html isn't a problem, it only prints what the file is, and i don't know how i would get rid of it without making the cgi download, because the browser won't know what kind of File it is. I'll check into it more.

Eliot,
Where you changed $in{'url'} to $in{'URL'}
Change it back, in trans.html
should be this
<textarea name="url" value="<%url%>" rows="6" wrap=virtual cols="56"></textarea>
The reason its lowercase is because i have it like you,
<a href="<%db_cgi_url%>/translate.cgi?url=<%URL%>">Translate Link</a>
so $in{'url'} would equal $in{'URL'}.

Widgetz,
I'm looking forward to the global.cgi part of the translator, I have alot of Spanish 3 presentations i would like to translate with a click. Also spider.cgi, mostly the being able to get the language of a document. I assume you parse it against certain characters, or maybe clone it on your cgi, then use $ENV{'HTTP_ACCEPT_LANGUAGE'}. Whatever, anyway, can't wait.
Quote Reply
Re: Automatic Language Translation? In reply to
Still no go....

Oh well. The only reason I want to use your script is that it reduces codes in the site_html_templates.pl and translate.cgi and integrates the error codes into one template file.

Oh well.

Mine still works fine.

Regards,

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


Quote Reply
Re: Automatic Language Translation? In reply to
if you remove the first print "Content-type: text/html\n\n";

in translate.cgi it will fix that problem.. bmxer prints it again in the subroutine which is causing the problem..

bmxer.. the language of the document is not parsed with the content of the file.. the way your saying with the cloning using UA (guess) wouldn't work either.. as it would always be english.. ACCEPT language is something you set with your browser.. doesn't have to do with the page.. i made my own perl module to retrieve the page and all it's information

jerry
Quote Reply
Re: Automatic Language Translation? In reply to
see..

edit your languages in netscape of internet explorer.. in netscape it's in

edit->preference->navigator->languages

in ie it's in

view->internet options->languages (at bottom)

put any one of these languages in any order

ANY french
ANY portuguese
ANY spanish
ANY german
italian
english

and go here:

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

that's what http_accept_languages is for.. nothing much really.. you can just send the user to a spanish page if he wants a spanish page.. not many sites do it..

jerry
Quote Reply
Re: Automatic Language Translation? In reply to
Jerry, are you saying if we remove
"Content-type: text/html\n\n"; from both location it would work?

i removed the first one but it did not work
i also removed the second one and it did not work
Quote Reply
Re: Automatic Language Translation? In reply to
just remove one of them.. i suggest the first one

jerry
Quote Reply
Re: Automatic Language Translation? In reply to
Greetings All!

By removing:
Code:
malformed header from script. Bad header=Soul Seeker</TITLE><STYLE TYPE: /home/nzcid/cgi-bin/links2/translate.cgi

It gets rid of printing context text/html on the page but comes up with the above error.



------------------
www.nzcid.godzone.net.nz
New Zealand Christian Internet Directory




Quote Reply
Re: Automatic Language Translation? In reply to
Greetings All!

If I remove the part out of the header in trans.html and leave it with
Code:
print "Content-type: text/html\n\n";
in translate.cgi it translates, but it still prints the above code on the html page.



------------------
www.nzcid.godzone.net.nz
New Zealand Christian Internet Directory




Quote Reply
Re: Automatic Language Translation? In reply to
oops..

remove

&html_print_headers;

from the subroutine(s) in site_html_templates.pl for translate.cgi

jerry
Quote Reply
Re: Automatic Language Translation? In reply to
Well, I am attempting to add this to a test site and see if it will work but all of the links seem to be down or missing.. Is this script still working and where can we get the translate.cgi or global.cgi etc..

Thanks.
Quote Reply
Re: Automatic Language Translation? In reply to
The new link to this Mod is located in the Resource Center and also at the following URL:

hypermart.lookhard.net/links-mods/

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
Anthro TECH, L.L.C
anthrotech.com
* Check Resource Center
* Search Forums
* Thinking out of the box (codes) is not only fun, but effective.


Quote Reply
Re: Automatic Language Translation? In reply to
I hope that my question is not tooooo silly for you, but please tell me, where I can find the translate.cgi
I searched in the forum, but I only found this URL "http://hypermart.lookhard.net/links-mods/", but it's broken ;-(

> > > >