Author |
Topic |
sy
Average Member
United Kingdom
638 Posts |
Posted - 25 August 2002 : 06:12:15
|
Here is a small mod, just save this a asp file and include it in your page where you want the translator to appear.
<form name="BABEL" action="http://world.altavista.com/tr?" method="get" target=_self"> <input type="hidden" name="tt" value="url"> <input type="hidden" name="text" value=""</input> <input type="hidden" value="doit" name="done"> <input type="hidden" value="http://<%=Request.ServerVariables("Server_Name")%><%=Request.ServerVariables("Script_Name")%>?<%=Request.ServerVariables("Query_String")%>" name="url"> Translator:<br> <select> <option value="en_zh" >English to Chinese</option> <option value="en_fr" SELECTED>English to French</option> <option value="en_de" >English to German</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_es" >English to Spanish</option> <option value="zh_en" >Chinese to English</option> <option value="fr_en" >French to English</option> <option value="fr_de" >French to German</option> <option value="de_en" >German to English</option> <option value="de_fr" >German to French</option> <option value="it_en" >Italian to English</option> <option value="ja_en" >Japanese to English</option> <option value="ko_en" >Korean to English</option> <option value="pt_en" >Portuguese to English</option> <option value="ru_en" >Russian to English</option> <option value="es_en" >Spanish to English</option> </select> <input type="Submit" alt="translator" value="Change " border="0"> </form>
Translations not always great, but it does ok with some pages.
Options:
<option> can be removed if you only want certain languages
I edit and remove site specific stuff, will work straight away.
Enjoy,
Sy |
The pessimist complains about the wind; the optimist expects it to change; the realist adjusts the sails
|
Edited by - sy on 25 August 2002 10:19:00 |
|
Etymon
Advanced Member
United States
2385 Posts |
Posted - 25 August 2002 : 09:13:42
|
Will this work with any version of the forums?
|
|
|
sji2671
Junior Member
United Kingdom
185 Posts |
Posted - 25 August 2002 : 09:34:32
|
Yes it will, and a handy little mod for basic translations anywhere on a website. |
|
|
Azaniah
Senior Member
United Kingdom
1004 Posts |
Posted - 25 August 2002 : 10:04:46
|
Do you have a demo of this?
|
Eagles fly!, but weasels don't get sucked into jet engines. |
|
|
sy
Average Member
United Kingdom
638 Posts |
Posted - 25 August 2002 : 10:17:27
|
Not really :) my site is on aspplayground.net and so is very bandwidth limited.
It basically displays a form dropdown element with 'translate' button (all one line) upon choosing a language pair and clicking the button, it opens a new window with the babel translation.
you can change the _self input in the code to whatever window you need, if for example you are using modeless window it can be made to not display altavista banner.
But that is naughty.
HTH |
The pessimist complains about the wind; the optimist expects it to change; the realist adjusts the sails
|
|
|
GTEUK
Starting Member
7 Posts |
|
sy
Average Member
United Kingdom
638 Posts |
Posted - 25 August 2002 : 16:33:25
|
Great! the output isn't amazing but its better than nothing :)
BTW, GTEUK, your link back to snitz on your forum is spelled 'stitz' :)
Sy |
The pessimist complains about the wind; the optimist expects it to change; the realist adjusts the sails
|
Edited by - sy on 25 August 2002 16:44:18 |
|
|
sy
Average Member
United Kingdom
638 Posts |
Posted - 25 August 2002 : 16:39:39
|
It should also be possible to use the babel fish translation as a hyperlink.
I will try this and get back to this topic when I have done so, that way we can have flags and stuff too to handle this.
Sy |
The pessimist complains about the wind; the optimist expects it to change; the realist adjusts the sails
|
|
|
Azaniah
Senior Member
United Kingdom
1004 Posts |
Posted - 25 August 2002 : 16:56:24
|
Hmm from that example I thought the output was quite good.. ok you get a banner frame, but seemed ok. |
Eagles fly!, but weasels don't get sucked into jet engines. |
|
|
GTEUK
Starting Member
7 Posts |
Posted - 25 August 2002 : 17:16:28
|
quote: BTW, GTEUK, your link back to snitz on your forum is spelled 'stitz' :)
OOps, thats what I get for making my own footers,, will fix now |
http://www.hostingyou.co.uk,, UK ASP hosting made simple |
|
|
Schwanke
New Member
77 Posts |
Posted - 25 August 2002 : 18:04:05
|
<input type="hidden" name="text" value=""</input>
Is that line right? I am pretty sure thats not valid html. Should probably replace </input> with a >. (Looks like you might have accidentally search and replacd it?) |
<>< |
|
|
Carefree
Advanced Member
Philippines
4207 Posts |
Posted - 01 October 2002 : 02:23:51
|
I changed it a bit:
I named it inc_dyntrans.asp & included it in footer.asp
Here's what I used:
<form name="TRANS" action="http://world.altavista.com/tr?" method="get" target=_self">
<input type="hidden" value="http://<%=Request.ServerVariables("Server_Name")%><%=Request.ServerVariables("Script_Name")%>?<%=Request.ServerVariables("Query_String")%>" name="url">
<select size="1" style="font-size:8pt;font-family:arial;color:000000;" name="lp">
<option value="en_zh" >English to Chinese</option>
<option value="en_fr" >English to French</option>
<option value="en_de" SELECTED>English to German</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_es" >English to Spanish</option>
<option value="zh_en" >Chinese to English</option>
<option value="fr_en" >French to English</option>
<option value="fr_de" >French to German</option>
<option value="de_en" >German to English</option>
<option value="de_fr" >German to French</option>
<option value="it_en" >Italian to English</option>
<option value="ja_en" >Japanese to English</option>
<option value="ko_en" >Korean to English</option>
<option value="pt_en" >Portuguese to English</option>
<option value="ru_en" >Russian to English</option>
<option value="es_en" >Spanish to English</option>
</select>
<input src="images/go_translate.gif" type="image" class="fields" alt="translator" input type = "Submit" value="Translate" border="0">
</form>
The go_translate.gif I selected is the one from Systran Technologies used by Babelfish:
go_translate.gif |
|
|
steve shakeshaft
New Member
United Kingdom
61 Posts |
Posted - 01 October 2002 : 04:49:20
|
That is a very cool mod! I like it. |
Regards
Steve.
steve@ukbeg.com |
|
|
havvoc
New Member
92 Posts |
Posted - 10 October 2002 : 13:57:41
|
Is there anyway to make this code work without a submit button? I tried and was wondering if one of you code gurus could help. It would be great if when a selection was made it would submit by the selection without having to press a submit button Thanks for any help with this Havvoc |
|
|
gareth_moore_2000
Junior Member
United Kingdom
262 Posts |
Posted - 10 October 2002 : 17:04:21
|
This is excellent, since I have a forum which has different languages ! However what I really need is translation in Finnish ! This is not an option on your Bable FiSH MOD, would it be possible to have it in Finnish ? |
|
|
sy
Average Member
United Kingdom
638 Posts |
Posted - 10 October 2002 : 19:19:26
|
Carefree: Looks cool will try this on my test site.
Steve: Thanks, its useful but not 100% accurate, hopefully we can make it better somehow.
Havvoc: Yes, but you will need to look at how this behaviour is done elsewhere to get the code, try looking at the line 42 of inc_jump_to.asp to see how to switch like you want.
gareth_moore_2000: I will update the language pairs when babel fish does, I am soon to release a new mod that uses alternate translation engines for certain languages, if you know a finnish engine let me know and i will include it with the update.
Its a nice friendly little mod.
Sy |
The pessimist complains about the wind; the optimist expects it to change; the realist adjusts the sails
|
|
|
Topic |
|