s.a kolay gelsin yav kanalda bota !googleceviri tr|en seni seviyorum yaziyorum kod calismiyor
Kod: Kodu kopyalamak için üzerine çift tıklayın!
;Google Translator. Compatible with mIRC 6.32+
;To install just load GoogleTranslator.mrc in the remote section of the scripteditor.
;Usage: In a channel type: !translate auto|EN Your non EN (english) sentence here.
;The from|to syntax is composed of 2 languages and a seperator. The first language is the language you
;write in, or autodetect mode. (eg.auto; FR (french) DE (German)). The languages are seperated by a |
;e.g. auto|EN. And the last language is the language it needs to be translated too.
;When Installed try this example first to see what it does. The sentence says "This is a test" in dutch.
;If you use it, the translator should return it in english.
;Example sentence: !translate NL|EN Dit is een test
;Replace NL by auto to let google detect the language.
;Credits for the basics go to seroyez. I removed the binvars and used regexes instead, since mirc 6.32.
;Feel free to use this script in any way you like but remember you can flood google with it so use wiseley.
;I'd like to see someone take this script and make some pretty dialog boxes for it and stuff.
;To get a list of all currently available languages use the command !translang in channel.
ON *:TEXT:*:#: {
if ($1 == !googlecevir) {
.remotetranslate # $nick $2-
}
elseif ($1 == !cevir) {
.msg # Ceviri Yapabiliceginiz Diller - 4AUTO|12tr - AUTO 2Arabic - AR 1Bulgarian - BG 2Catalan - CA 1Tradiditonal 2Chinese - zh-TW 1Simplified Chinese - zh-CN 2Danish - DA 1German - DE 2English - EN 1Finnish - FI 2French - FR 1Greek - EL 2Hebrew - IW 1Hindi - HI 2Indonesian - ID 1Italian - IT 2Japanese - JA 1Korean - KO 2Croatian - HR 1Latvian - LV 2Croatian - LT 1Dutch - NL 2Norwegian - NO 1Ukrainian - UK 2Polish - PL 1Portuguese - PT 2Romanian - RO 1Russian - RU 2Serbian - SR 1Slovak - SK 2Slovene - SL 1Spanish - ES 2Tagalog - tl 1Czech - CS 2Vietnamese - VI 1Swedish - SV
}
}
ON *:INPUT:#: {
if ($1 == !googlecevir) {
.remotetranslate # $nick $2-
}
elseif ($1 == !cevir) {
.echo # Ceviri Yapabiliceginiz Diller - 4AUTO|12tr - AUTO 2Arabic - AR 1Bulgarian - BG 2Catalan - CA 1Tradiditonal 2Chinese - zh-TW 1Simplified Chinese - zh-CN 2Danish - DA 1German - DE 2English - EN 1Finnish - FI 2French - FR 1Greek - EL 2Hebrew - IW 1Hindi - HI 2Indonesian - ID 1Italian - IT 2Japanese - JA 1Korean - KO 2Croatian - HR 1Latvian - LV 2Croatian - LT 1Dutch - NL 2Norwegian - NO 1Ukrainian - UK 2Polish - PL 1Portuguese - PT 2Romanian - RO 1Russian - RU 2Serbian - SR 1Slovak - SK 2Slovene - SL 1Spanish - ES 2Tagalog - tl 1Czech - CS 2Vietnamese - VI 1Swedish - SV
}
}
alias remotetranslate {
var %I = $ticks
set $+(%,trans.chan.,%I) $1
set $+(%,trans.nick.,%I) $2
set $+(%,trans.lang.,%I) $3
set $+(%,trans.phrase.,%I) $remove($4-,$chr(42))
sockopen $+(remotetrans.,%I)
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
80
}
on *:SOCKOPEN:remotetrans.*: {
sockwrite -n $sockname GET $+(/translate_t?langpair=,$($+(%,trans.lang.,$gettok($sockname,2,46)),2),&text=,$urlencode($($+(%,trans.phrase.,$gettok($sockname,2,46)),2))) HTTP/1.1
sockwrite -n $sockname Host:
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
size="2">sockwrite -n $sockname User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9b4) Gecko/2008030714 Firefox/3.0b4 $+ $crlf $+ $crlf
}
on *:SOCKREAD:remotetrans.*: {
var %I = $gettok($sockname,2,46)
var %r
sockread %r
if ($regex(%r,<div id=result_box dir="ltr">)) {
.msg $($+(%,trans.chan.,%I),2) 4Google Ceviri $($+(%,trans.nick.,%I),2) :2 $replace($regsubex(%r,/[^*]*<div id=result_box dir="ltr">|</div>[^*]*/g,$null),',')
.echo $($+(%,trans.chan.,%I),2) 4Google Ceviri $($+(%,trans.nick.,%I),2) :2 $replace($regsubex(%r,/[^*]*<div id=result_box dir="ltr">|</div>[^*]*/g,$null),',')
unset %trans.*. [ $+ [ $gettok($sockname,2,46) ] ] | sockclose $sockname
}
elseif ($regex(%r,<div id=result_box dir="rtl">)) {
.msg $($+(%,trans.chan.,%I),2) 4Kelimeniz Cevrilmistir $($+(%,trans.nick.,%I),2) :2 $replace($regsubex(%r,/[^*]*<div id=result_box dir="rtl">|</div>[^*]*/g,$null),',')
.echo $($+(%,trans.chan.,%I),2) 4Kelimeniz Cevrilmistir $($+(%,trans.nick.,%I),2) :2 $replace($regsubex(%r,/[^*]*<div id=result_box dir="rtl">|</div>[^*]*/g,$null),',')
unset %trans.*. [ $+ [ $gettok($sockname,2,46) ] ] | sockclose $sockname
}
}
alias langfull {
if ($1 == Auto) { return Auto }
elseif ($1 == ar) { return Arabic }
elseif ($1 == tr) { return Turkiye }
elseif ($1 == bg) { return Bulgarian }
elseif ($1 == ca) { return Catalan }
elseif ($1 == zh-TW) { return Tradiditonal Chinese }
elseif ($1 == zh-CN) { return Simplified Chinese }
elseif ($1 == da) { return Danish }
elseif ($1 == de) { return German }
elseif ($1 == en) { return English }
elseif ($1 == fi) { return Finnish }
elseif ($1 == fr) { return French }
elseif ($1 == el) { return Greek }
elseif ($1 == iw) { return Hebrew }
elseif ($1 == hi) { return Hindi }
elseif ($1 == id) { return Indonesian }
elseif ($1 == it) { return Italian }
elseif ($1 == ja) { return Japanese }
elseif ($1 == ko) { return Korean }
elseif ($1 == hr) { return Croatian }
elseif ($1 == lv) { return Latvian }
elseif ($1 == lt) { return Croatian }
elseif ($1 == nl) { return Dutch }
elseif ($1 == no) { return Norwegian }
elseif ($1 == uk) { return Ukrainian }
elseif ($1 == pl) { return Polish }
elseif ($1 == pt) { return Portuguese }
elseif ($1 == ro) { return Romanian }
elseif ($1 == ru) { return Russian }
elseif ($1 == sr) { return Serbian }
elseif ($1 == sk) { return Slovak }
elseif ($1 == sl) { return Slovene }
elseif ($1 == es) { return Spanish }
elseif ($1 == tl) { return Tagalog }
elseif ($1 == cs) { return Czech }
elseif ($1 == vi) { return Vietnamese }
elseif ($1 == sv) { return Swedish }
}
alias b { return $+($chr(2),$1-,$chr(2)) }
alias br { return $+($chr(40),$1-,$chr(41)) }
alias urlencode { return $regsubex($1,/(\W)/gS,% $+ $base($asc(\1),10,16,2))) }
alias antientities { return $regsubex($1,/&(.+?);/g,$entity2chr(\1)) }
alias entity2chr {
if #* iswm $1 return $chr($mid($1,2))
elseif $1 == nbps return $chr(32)
elseif $1 == quot return "
elseif $1 == apos return '
elseif $1 == amp return &
elseif $1 == lt return <
elseif $1 == gt return >
elseif $1 == copy return ©
elseif $1 == reg return ®
else return $1
}