translator adiumscript

An instant messenger which can connect to AIM, GTalk, Jabber, ICQ, and more.
Post Reply
ahmettaha
Harmless
Posts: 15
Joined: Thu Nov 30, 2006 10:58 am

translator adiumscript

Post by ahmettaha »

I'm creating an adiumscript that translates from one language to another. I'm done with the translation part. However, I have a couple questions about the adium part.

is it possible to have syntax like this

/translate english french Today is sunday

so the first input is the base language
second input is the target language
and the rest is the message

also is it possible to have pulldowns or any other kind of helper for the languages. Any help is appriated. thanks.

I tried this in the plist
/translate {from}{to}{text}

and in the applescript
on substitute(fromL, toL, messageL)
return fromL & toL & messageL
end substitute

bu it doesnt work
User avatar
evands
Cocoaforge Admin
Posts: 3152
Joined: Thu Dec 02, 2004 10:55 pm
Location: Decatur, GA
Contact:

Post by evands »

you could parse the string, so have the user do
/translate{english,french,this is what should be translated}
and then use applescript text delimiters to split it up.

Possibly also of interest: there's an automatic translation plugin which is mostly complete and may be available with Adium 1.0 as an add-on that lets you set a language pair on a per-contact basis; all messages with that contact will be translated to/from appropriately.
The duck still burns.
--
My company: Saltatory Software. Check it out :)
ahmettaha
Harmless
Posts: 15
Joined: Thu Nov 30, 2006 10:58 am

Post by ahmettaha »

yes, I was looking for something like that, but I couldnt find it. do you have the link by any chance?
Post Reply