hi,
  I try make  a tranlator with vim + curl + googleapi, but have
problem with the campture of output.
You might give me some help with code?
how can only catch the translated text ?

function! Translate(entrada)
   execute '!curl -e www.google.com
"http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q='.a:entrada.'&langpair=en\%7Ces"'
endfunction
command! -nargs=+ -complete=command Translate call Translate(<q-args>)

Translate hello
:!curl -e www.google.com
"http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=hello&langpair=en%7Ces";
[No write since last change]
{"responseData": {"translatedText":"hola"}, "responseDetails": null,
"responseStatus": 200}

-- 
JuanPablo

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to