Jump to content

[Solved]_Help with Babelfish Translation snippet


Recommended Posts

I would like to make small snippet to Translate my Manga titles from japannese to english, the only thing im missing is that I dont know how to make an URL out of the info pieces I have, & lather I can just use $oHTTP.Responsetext to retrive the translated info:

Main URL

http://babelfish.yahoo.com/translate_txt

The URL should look something like this, but all my attempts with using google as example have failed, maybe someone who knows how this work can point me into the right directon:

EDIT: K Let me explain How we can do this:

Lets say we want to translate word 'nice' from english to japaneese we open webpage source & find this:

<input type=hidden name=tt value="urltext" >
<textarea rows="6" wrap=virtual cols="20" name="trtext"">nice</textarea><br>
 <nobr><select name="lp" class="inp_sel" style="font-size:0.8em;">

name=tt         value="urltext"
name="trtext"   value=nice
name="lp"         value=en_ja

Final URL

http://babelfish.yahoo.com/translate_txt?tt=urltext&trtext=nice&lp=en_ja

so as you see:tt equals urltext and trtext equals nice and lp equals en_ja very simple isn it

Edited by goldenix
My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]
Link to comment
Share on other sites

The HTTP(S) tab in DebugBar shows this as the post string for translating "This is a test." to Japanese:

ei=UTF-8&doit=done&fr=bf-res&intl=1&tt=urltext&trtext=This+is+a+test.&lp=en_ja&btnTrTxt=Translate

and this for translating it back again:

ei=UTF-8&doit=done&fr=bf-res&intl=1&tt=urltext&trtext=%E3%81%93%E3%82%8C%E3%81%AF%E3%83%86%E3%82%B9%E3%83%88%E3%81%A7%E3%81%82%E3%82%8B%E3%80%82&lp=ja_en&btnTrTxt=Translate

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

The HTTP(S) tab in DebugBar shows this as the post string for translating "This is a test." to Japanese:

Okey I got the code working, but The HTTP(S) tab in DebugBar where can I find this? There is no HTTP(S) tab DebugBar in Scite, or is it?

the code is hire btw if someone wants it:

Step 1. Create My_UTF_file.au3 file with this code:

$File = FileOpen('My_UTF_file.au3', 128+1)
    FileWriteLine($File, @CRLF)
    FileClose($File)oÝ÷ Ù&¦¦WºÚ"µÍß]ÈÚÙHÈ]H[YÙH[ÝXYÙHÝÜÈH[Ý[YßOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOBßÜX]H[HU[ÛÙY[H[ØÜÌLÂßOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOBÌÍÑ[WÝHHØÜ    [È ÌÎNÉÌLÝ[Û]Y   ÌÎNÂIÌÍÑ[HH[SÜ[  ÌÍÑ[WÝKL
ÌJBQ[UÜ]S[J   ÌÍÑ[KÔBQ[PÛÜÙJ   ÌÍÑ[JBBßOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOBß[][Ý[Û][ÈÜ[ÛÂßOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOBIÌÍÓ^WÝ^H  ÌÎNÉÌMÉÌLÎÎÉÌLÎ
NÉÌLÎNÉÌÍÎ
ÉÍ
NÈ ÌNNMÎÉÌ
NNÉÌÎNÂIÌÍÛÜ[ÛH    ÌÎNÚWÙ[ÌÎNÂIÌÍÕ]HHHÕ[Û]J    ÌÍÛÜ[Û ÌÍÓ^WÝ^
BBßOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOBßÜ]HH[Û]Y[H[ÈH[H [ÈÛÛÛÛBßOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOBQ[UÜ]S[J  ÌÍÑ[WÝK ÌÍÓ^WÝ^ [È ÌÎNÈH    ÌÎNÈ [È ÌÍÕ]H    [ÈÔBBßPÛÛÛÛUÜ]H
    ÌÍÓ^WÝ^ [È ÌÎNÈH    ÌÎNÈ [È ÌÍÕ]H    [ÈÔBBßOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOBßÈÈQßOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOB[ÈÕ[Û]J  ÌÍÓÔSÓ ÌÍÕV
BIÌÍÕTHOH    ÌÎNÚËØX[ÚXZÛËÛÛKÝ[Û]WÝÙZOUUN  [ÙÚ]YÛI[ÙXÉ[Ú[LI[Ý]^ [Ý^IÌÎNÂIÌÍÕTOH  ÌÎNÉ[ÛIÌÎNÂIÌÍÕTÈOH  ÌÎNÉ[ØU[Û]IÌÎNÂIÌÍÕTH    ÌÍÕTH    [È ÌÍÕV [È ÌÍÕT [È ÌÍÓÔSÓ [È ÌÍÕTÂBIÌÍÛÒHØÜX]J ][ÝÝÚ[Ú[]YÝKI][ÝÊBBIÌÍÛÒÜ[  ][ÝÑÑU   ][ÝË  ÌÍÕT
HÈ]YØ]HÈYÙHÚH[XYÙHÈÜ^YYBIÌÍÛÒÙ[

BBIÌÍÒSÛÝÙHH  ÌÍÛÒÜÛÙ]^BIÌÍ×Ð^[[HHÝ[ÔÜ]
    ÌÍÒSÛÝÙKHÈÈÈH^H    ÌÍ×Ð^[[BBBBBYÜ ÌÍÚHHHÈ ÌÍ×Ð^[[VÌHBBBRYÝ[Ò[Ý    ÌÍ×Ð^[[VÉÌÍÚWK  ÌÎNÉÙ]YI][ÝÜÝ[   ][ÝÉÝÉÙ]Ý[OI][ÝÜY[Î[NÉ][ÝÉÝÉÌÎNÊH[NÈÙXÚ^HÜ[Û]YBBBBBBBBBIÌÍ×Ý]HHÝ[ÔYÑ^
    ÌÍ×Ð^[[VÉÌÍÚWH  ÌÎNÉÊÚJY]Ý[OI][ÝÜY[Î[NÉ][ÝÉÝÊÊIËÊÚJY]ÝÉÌÎNËNÈÙ]][BBBBBIÌÍ×Ý]HH ÌÍ×Ý]VÌWBBBBQ[YBBS^BBBT]   ÌÍ×Ý]B[[ÂØÜÈIÛÜ[Û[YOI][ÝÞÙ[][ÝÉÝÐÚ[ÙKÚ[È[ÛÚ ËÛÜ[ÛÝÂIÛÜ[Û[YOI][ÝÞÞ   ][ÝÉÝÐÚ[ÙKÚ[ÈÚ[ÙK]Y   ËÛÜ[ÛÝÂIÛÜ[Û[YOI][ÝÞÙ[][ÝÉÝÐÚ[ÙK]YÈ[ÛÚ ËÛÜ[ÛÝÂIÛÜ[Û[YOI][ÝÞÞ   ][ÝÉÝÐÚ[ÙK]YÈÚ[ÙKÚ[   ËÛÜ[ÛÝÂIÛÜ[Û[YOI][ÝÙ[Þ  ][ÝÉÝÑ[ÛÚÈÚ[ÙKÚ[  ËÛÜ[ÛÝÂIÛÜ[Û[YOI][ÝÙ[Þ  ][ÝÉÝÑ[ÛÚÈÚ[ÙK]Y   ËÛÜ[ÛÝÂIÛÜ[Û[YOI][ÝÙ[Û  ][ÝÉÝÑ[ÛÚÈ]Ú    ËÛÜ[ÛÝÂIÛÜ[Û[YOI][ÝÙ[Ù][ÝÉÝÑ[ÛÚÈ[Ú  ËÛÜ[ÛÝÂIÛÜ[Û[YOI][ÝÙ[ÙI][ÝÉÝÑ[ÛÚÈÙX[ËÛÜ[ÛÝÂIÛÜ[Û[YOI][ÝÙ[Ù[ ][ÝÉÝÑ[ÛÚÈÜYZÉËÛÜ[ÛÝÂIÛÜ[Û[YOI][ÝÙ[Ú]  ][ÝÉÝÑ[ÛÚÈ][X[ËÛÜ[ÛÝÂIÛÜ[Û[YOI][ÝÙ[ÚI][ÝÉÝÑ[ÛÚÈ[ÙIËÛÜ[ÛÝÂIÛÜ[Û[YOI][ÝÙ[ÚÛÉ][ÝÉÝÑ[ÛÚÈÛÜX[ËÛÜ[ÛÝÂIÛÜ[Û[YOI][ÝÙ[Ü    ][ÝÉÝÑ[ÛÚÈÜYÝYÙIËÛÜ[ÛÝÂIÛÜ[Û[YOI][ÝÙ[ÜI][ÝÉÝÑ[ÛÚÈÜÚX[ËÛÜ[ÛÝÂIÛÜ[Û[YOI][ÝÙ[ÙÉ][ÝÉÝÑ[ÛÚÈÜ[Ú  ËÛÜ[ÛÝÂIÛÜ[Û[YOI][ÝÛÙ[][ÝÉÝÑ]ÚÈ[ÛÚ  ËÛÜ[ÛÝÂIÛÜ[Û[YOI][ÝÛÙ][ÝÉÝÑ]ÚÈ[Ú ËÛÜ[ÛÝÂIÛÜ[Û[YOI][ÝÙÛ   ][ÝÉÝÑ[ÚÈ]Ú  ËÛÜ[ÛÝÂIÛÜ[Û[YOI][ÝÙÙ[][ÝÉÝÑ[ÚÈ[ÛÚ  ËÛÜ[ÛÝÂIÛÜ[Û[YOI][ÝÙÙI][ÝÉÝÑ[ÚÈÙX[ËÛÜ[ÛÝÂIÛÜ[Û[YOI][ÝÙÙ[ ][ÝÉÝÑ[ÚÈÜYZÉËÛÜ[ÛÝÂIÛÜ[Û[YOI][ÝÙÚ] ][ÝÉÝÑ[ÚÈ][X[ËÛÜ[ÛÝÂIÛÜ[Û[YOI][ÝÙÜ    ][ÝÉÝÑ[ÚÈÜYÝYÙIËÛÜ[ÛÝÂIÛÜ[Û[YOI][ÝÙÙÉ][ÝÉÝÑ[ÚÈÜ[Ú ËÛÜ[ÛÝÂIÛÜ[Û[YOI][ÝÙWÙ[][ÝÉÝÑÙX[È[ÛÚ    ËÛÜ[ÛÝÂIÛÜ[Û[YOI][ÝÙWÙ][ÝÉÝÑÙX[È[Ú   ËÛÜ[ÛÝÂIÛÜ[Û[YOI][ÝÙ[Ù[][ÝÉÝÑÜYZÈÈ[ÛÚ  ËÛÜ[ÛÝÂIÛÜ[Û[YOI][ÝÙ[Ù][ÝÉÝÑÜYZÈÈ[Ú ËÛÜ[ÛÝÂIÛÜ[Û[YOI][ÝÚ]Ù[][ÝÉÝÒ][X[È[ÛÚ    ËÛÜ[ÛÝÂIÛÜ[Û[YOI][ÝÚ]Ù][ÝÉÝÒ][X[È[Ú   ËÛÜ[ÛÝÂIÛÜ[Û[YOI][ÝÚWÙ[][ÝÈÙ[XÝY    ÝÒ[ÙHÈ[ÛÚ ËÛÜ[ÛÝÂIÛÜ[Û[YOI][ÝÚÛ×Ù[][ÝÉÝÒÛÜX[È[ÛÚ   ËÛÜ[ÛÝÂIÛÜ[Û[YOI][ÝÜÙ[][ÝÉÝÔÜYÝYÙHÈ[ÛÚ    ËÛÜ[ÛÝÂIÛÜ[Û[YOI][ÝÜÙ][ÝÉÝÔÜYÝYÙHÈ[Ú   ËÛÜ[ÛÝÂIÛÜ[Û[YOI][ÝÜWÙ[][ÝÉÝÔÜÚX[È[ÛÚ  ËÛÜ[ÛÝÂIÛÜ[Û[YOI][ÝÙ×Ù[][ÝÉÝÔÜ[ÚÈ[ÛÚ  ËÛÜ[ÛÝÂIÛÜ[Û[YOI][ÝÙ×Ù][ÝÉÝÔÜ[ÚÈ[Ú ËÛÜ[ÛÝÂÐÙ
My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]
Link to comment
Share on other sites

See my Sig for a pointer to DebugBar.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...