Created
July 25, 2014 19:03
-
-
Save izabera/70e0f4f6d2e7b6249c5a to your computer and use it in GitHub Desktop.
kvirc translate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%l1=$0 | |
%l2=$1 | |
%string=$2- | |
say Traduzione di \"%string\" da $b%l1$b a $b%l2$b | |
%string=$str.replace(%string," ","+") | |
%string=http://mymemory.translated.net/api/get?q=%string&langpair=%l1|%l2 | |
http.asyncGet -e=o -w=h -i=$window (%string,$file.localdir(result)) | |
{ | |
%string=$file.read($file.localdir(result)); | |
%result[]=$str.split(:\",%string); | |
%len=$($str.len(%result[1])-20) | |
%translated=$str.strip($str.left(%result[1],%len)) | |
say -r=$3 %translated | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment