I am writing a program to list all the unique words in a movie subtitle file using Matlab. Now I have a unique list of words that I want to translate into my language and find out the meaning before watching the movie.
Does anyone know how I can use Google Translate in Matlab to complete my script? Is there any web service or how and how can I use it in matlab?
Thanks,
Appendix 1: I found this code useful:
%build url and send to google
url = 'http://ajax.googleapis.com/ajax/services/language/translate';
page = urlread(url, 'get', {'v', '1.0','q', inputString,'langpair', [sourceLanguage '|' destLanguage]});
but I don’t know why it returns an error every time I run it (for example, 403or 400). I know that my internet connection is ok during testing.
source
share