Tremulous Forum
Mods => Modding Center => Topic started by: Patriotpie on February 21, 2010, 11:50:28 pm
-
I play with a lot of spanish people and my spanish is kind of rough, but I would like to be able to know what they are saying.
I've been using Google's translator thus far. So, I wanted to build Google Translate into Trem. I found this translator:
http://translate.reference.com/translate?query=[%s]&src=es&dst=en&v=1.0 (http://translate.reference.com/translate?query=)
I opted for this translator because it is easy to form a URL, and the resulting page is parseable - unlike with Google Translate, the source of the page changes to reflect the translated text. So, it's easy to form a URL on-the-fly, and the resulting page source is (relatively) easy to parse. Now that I have a program to work with, I need to put this code into the tremulous console. Ideally, it would be a command like
\translate text+to+be+translated
The page would be called, source would be parsed, and text would returned to console. (hopefully)
tl;dr: how do i put a program i made into the console
-
It needs to be a part of the client itself, meaning you have to compile your own, after you code the function as a part of it. Or you could probably get it working from a qvm somehow, but it doesn't seem very likely.
-
I don't think QVM's have access to curl and whatnot, and you wouldn't be able to play on pure servers anyway.
The client already has curl in there, but probably not easy. And it'll probably hitch while waiting for a response.
-
I don't think QVM's have access to curl and whatnot, and you wouldn't be able to play on pure servers anyway.
The client already has curl in there, but probably not easy. And it'll probably hitch while waiting for a response.
qvm has access to whatever you allow. curl can work without blocking other things