Page 1 of 1

translator adiumscript

Posted: Wed Dec 20, 2006 1:50 pm
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

Posted: Wed Dec 20, 2006 10:47 pm
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.

Posted: Wed Dec 20, 2006 10:55 pm
by ahmettaha
yes, I was looking for something like that, but I couldnt find it. do you have the link by any chance?