Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

10 455 Posts in 5 830 Topics- by 1 216 Members - Latest Member: santini862

20 October 2019, 07:25
Select Language English | Russian ru | German
Main PageIRC Client KVIrc forumKVIrc discussionKVIrc scriptingOnChannelMessage Google Translate
Pages: [1]
Print
Author Topic: OnChannelMessage Google Translate  (Read 12465 times)
0 Members and 1 Guest are viewing this topic.
ambossarm
Постоялец
***

Репутация: 11
Gender: Male
Posts: 148



View Profile
« on: 8 March 2011, 05:29 »

The Class translates the message it gets and echos the result into the channel the message is from. The Event is triggered if the channel is #kvirc and translates from en to de.

Thanks to alexzulu for the open GoogleAPI without Key.

Quote
class("gtrans","http")
{
   function doneEvent()
   {
      %answer = $str.section(@$readAll(),"\"",5,5)
      echo -w=@%windowid %answer;
   }

   function trigger()
   {
      #$0: source
      #$1: target
      #$2: message
      @$setHost("ajax.googleapis.com");
      @$get("/ajax/services/language/translate?v=1.0&q=$str.urlencode($2)&langpair=$0|$1");
      @%windowid = $3;
   }
}


event(OnChannelMessage,GoogleTranslate)
{
   if ($target == "#kvirc") {
      %gtrans = $new(gtrans);
      %gtrans->$trigger("en","de",$3,$channel($target));   
   }
}
Logged
dracozny
Новичок
*

Репутация: 2
Posts: 43


View Profile
« Reply #1 on: 21 December 2011, 06:25 »

taking it up a noch.. the mibbit web client(although I do detest it) will translate any language to the desired language, it uses the auto detect function of the google api.
Logged
ambossarm
Постоялец
***

Репутация: 11
Gender: Male
Posts: 148



View Profile
« Reply #2 on: 21 December 2011, 10:53 »

try setting $0 to auto, but it will have problems with nonperfect lines, like most chats are.

Not only typos are a problem, most chat have a shortform for words that are not recognized by google.
Logged
dracozny
Новичок
*

Репутация: 2
Posts: 43


View Profile
« Reply #3 on: 21 December 2011, 11:05 »

thats a given for most (non human)translators.
however doing that only produces
"invalid translation language pair"
« Last Edit: 21 December 2011, 11:30 by dracozny » Logged
dracozny
Новичок
*

Репутация: 2
Posts: 43


View Profile
« Reply #4 on: 21 December 2011, 11:37 »

from the google api
Quote
Warning: You need your own API key in order to use the Language Detect API. In the example below, replace "INSERT-YOUR-KEY" with your own, unique key. Without a unique key, these examples won't work.
so no auto translate unless you wanna pay for it in v2
Quote
For text translations, you can use the Google Translate API v2, which is now available as a paid service

worst yet using the code as is
Quote
Suspected Terms of Service Abuse. Please see http://code.google.com/apis/errors

Quote
Google Translate API v1 was officially deprecated on May 26, 2011; it was shut off completely on December 1, 2011.

« Last Edit: 21 December 2011, 11:41 by dracozny » Logged
alexzulu
Постоялец
***

Репутация: 34
Posts: 211



View Profile Email
« Reply #5 on: 22 December 2011, 19:17 »

the project is closed. service has ceased to be free.
Logged

Network: freenode. Channels: #kvirc and #kvirc-ru
ambossarm
Постоялец
***

Репутация: 11
Gender: Male
Posts: 148



View Profile
« Reply #6 on: 23 December 2011, 02:42 »

WTF, I just wanted to post my v2 version of the script and tell the ppl to get a free key for their own use, but there is no free service at all oO?

Quote
Courtesy limit: 0 characters/day • Pricing



    1 M characters of text: $20.00


Everything else on google has a free "courtesy limit" , damn!
1 Million Chars 20 bucks, that is 1MB of text costs 20$ oO? they really think they have a perfect translation...


Is there a service like that from MS or Yahoo?

http://www.microsofttranslator.com
http://babelfish.yahoo.com

Do they have an API?



just reading http://en.wikipedia.org/wiki/Comparison_of_machine_translation_applications
« Last Edit: 23 December 2011, 02:49 by ambossarm » Logged
Rizon
Новичок
*

Репутация: 0
Posts: 17


Noctis


View Profile WWW Email
« Reply #7 on: 6 December 2012, 10:01 »


Man in mirc is posible.

Someone to translate this D=? of mirc to kvirc?



http://www.hawkee.com/snippet/6925/

i try with http.get is posible
Logged

Yeah =) time zero : http://kvircode.blogspot.com
ninest123
Ветеран
*****

Репутация: 0
Posts: 1 382


View Profile Email
« Reply #8 on: 6 November 2018, 09:50 »

cc20181106
birkenstocks
valentino shoes
ysl handbags
pandora store
pandora jewelry outlet
ugg outlet
coach outlet
philipp plein outlet
nike basketball shoes
coach outlet
louis vuitton outlet online
michael kors outlet canada
michael kors handbags
canada goose outlet
prada handbags
canada goose outlet
adidas yeezy
uggs outlet
chicago white sox jerseys
ugg boots
discount oakley sunglasses
ralph lauren sale clearance
tory burch outlet online
moncler outlet
nike air max
north face jackets
canada goose sale
jordan shoes
san diego padres jerseys
pandora jewelry
michael kors outlet
minnesota twins jerseys
pg 2
uggs outlet
oakley sunglasses outlet
air max 2017
air jordan shoes
louis vuitton outlet
pandora charms
cheap nike air max
christian louboutin
uggs canada
michael kors outlet
ecco shoes for men
coach outlet
ralph lauren outlet
uggs
pandora jewelry official site
coach outlet store
adidas outlet
fitflops sale clearance
coach factory outlet
asics outlet
red bottom shoes
coach outlet
nike air more money
ecco shoes
moncler outlet
fitflops
mont blanc pens
prada outlet
florida marlins jerseys
coach outlet
moncler jackets
jordan shoes
coach factorty outlet
ray ban sunglasses
nfl jerseys wholesale
michael kors outlet
birkenstock sandals
houston astros jerseys
yeezy boost 350
jimmy choo outlet
gucci outlet
ysl outlet
coach outlet store
nike outlet
polo outlet store
oakland athletics jerseys
cristiano ronaldo jerseys
rolex watches
canada goose jackets
ralph lauren outlet
christian louboutin outlet
uggs outlet
toms shoes
new balance shoes
ugg outlet
texas rangers jersey
kobe bryant shoes
coach factory outlet
coach factorty outlet
canada goose outlet
uggs outlet
pandora jewelry
longchamp handbags
yeezy boost
ecco shoes
pandora jewelry
canada goose outlet
coach outlet
pandora jewelry
polo ralph lauren outlet
louis vuitton outlet online
fitflops sale
pandora outlet
canada goose jackets
arizona diamondbacks jerseys
fitflops
moncler jackets
ugg boots
moncler outlet
dr martens boots
uggs outlet store
adidas yeezy
kate spade outlet store
cheap jordan shoes
ugg outlet
nike tessen
timberland boots
coach canada outlet
adidas shoes
cheap nfl jerseys
fitflops
air max 90
ugg outlet
coach outlet
nike air presto
nike shoes
uggs outlet store
ralph lauren outlet
gucci outlet
los angeles angels jerseys
christian louboutin
nike outlet online
true religion outlet
nike shoes
timberland boots
cincinnati reds jerseys
nike air max
pandora charms sale
cheap oakley sunglasses
michael kors outlet
pandora charms sale clearance
lacoste polo shirts
coach outlet
swarovski outlet
coach outlet
kansas city royals jerseys
oakley sunglasses
birkenstock outlet
air max 97
uggs canada
hermes birkin
kate spade handbags
nmd adidas
pandora jewelry
fitflops sale clearance
skechers shoes
new york mets jerseys
nike dunks
coach outlet online
vans shoes
pandora charms
coach outlet
adidas yeezy boost
fred perry
pandora jewelry
canada goose outlet
tampa bay devil rays jerseys
michael kors outlet clearance
oakley sunglasses
adidas superstar
kate spade outlet store
supra shoes
ralph lauren sale clearance
michael kors handbags
canada goose outlet
kevin durant shoes
michael kors outlet online
toms outlet
canadian goose
coach factory outlet
pandora jewelry
ecco outlet
coach factory outlet
seattle mariners jerseys
cheap jordan shoes
hermes handbags
true religion outlet online
michael kors outlet
pandora jewelry official site
nike huarache
air jordan shoes
pandora charms sale clearance
replica watches
coach outlet store
canada goose outlet
nike free 4.0
moncler outlet
kate spade handbag
canada goose jackets
canada goose outlet
timberland boots
atlanta braves jerseys
ralph lauren uk
toms outlet
adidas shoes
hermes handbags
nike air max outlet
kate spade bags
cc20181106
Logged
ninest123
Ветеран
*****

Репутация: 0
Posts: 1 382


View Profile Email
« Reply #9 on: 25 June 2019, 07:16 »

instyler ionic styler
pandora jewelry canada
lacoste polo shirts
toms outlet store
moncler outlet online
pandora outlet
coach factory outlet online
ravens jerseys
fjallraven kanken
kate spade handbags
mlb jerseys
pandora jewelry outlet
nike blazer
cubs jerseys
ronaldo jerseys
fitflops sale clearance
north face outlet online
uggs
ecco outlet
kobe shoes
coach handbags
coach outlet online
patriots jerseys
air max shoes
air max
coach outlet online
adidas yeezy boost
toms
pandora charms sale
ed hardy outlet
gucci bags
christian louboutin shoes
cowboys jerseys
gucci outlet online
san diego chargers jerseys
christian louboutin sale
coach factory outlet online
nike shoes
michael kors outlet clearance
cheap jordan shoes
moncler jackets
maui jim sunglasses
yeezy shoes
pandora charms
jets jersey
true religion jeans
coach outlet
coach outlet
air jordan shoes
adidas sneakers
coach factorty outlet store
bape hoodie
juicy couture
ralph lauren outlet
nike shoes
michael kors outlet canada
oakley sunglasses outlet
cheap mlb jerseys
coach outlet store
david yurman
jordans
polo ralph lauren outlet online
coach factory outlet online
houston texans jerseys
hermes belt
jordan 12
gucci outlet online
coach outlet online
prada outlet
giants jerseys
coach purse
toms shoes
swarovski jewelry outlet
kate spade outlet store
under armour shoes
the north face jackets
air max 270
coach outlet canada
coach factory outlet online
ugg boots clearance
uggs outlet
cheap oakley sunglasses
pandora jewelry
michael kors outlet store
pandora charms outlet
north face outlet
pandora sale clearance
hermes bags
ralph lauren outlet online
canada goose sale
adidas outlet online
mont blanc
persol
christian louboutin shoes
miu miu handbags
coach outlet online
foamposite shoe
coach outlet store online
nike hyperdunk
kate spade outlet online
gymshark sale
givenchy handbags
nobis jackets
cheap jordans for sale
michael kors factory outlet
yeti tumbler
coach outlet online
true religion jeans sale
yeezy shoes
ralph lauren polo
nike air force
celine outlet
uggs outlet
pandora jewelry outlet
christian louboutin shoes
coach outlet online
louis vuitton outlet store
yeezy boost 350
ralph lauren outlet online
air huarache
nike tn
bathing ape
pandora rings
ugg outlet
ralph lauren uk
indianapolis colts jerseys
cnaada goose outlet store
cincinnati bengals jersey
moncler outlet online
prada handbags
yolo
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic