3.5

3.5 | 2 ratings Rate this file 21 downloads (last 30 days) File Size: 3.7 KB File ID: #23988

Google(R) Translate

by Michael Katz

 

04 May 2009 (Updated 10 Jul 2009)

Code covered by BSD License  

Translates a string between languages using Google(R)'s Language API.

Download Now | Watch this File

File Information
Description

This file uses MATLAB(R)'s web services with Google's AJAX Language Translation API to take one string and translate it to anther:

For example to translate a string to Sweedish:

>> gtranslate('Good morning Mr. Peterson, how is your cat?','sv')

ans =

God morgon Mr Peterson, hur är din katt?

You can specify source (default is English) and destination languages using the two-letter http://en.wikipedia.org/wiki/ISO_639-1 codes.

Note that the default character encoding may make some languages (Russian, Japanese, etc) unrenderable.

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
(another) JSON Parser

MATLAB release MATLAB 7.8 (R2009a)
Zip File Content  
Other Files gtranslate.m,
license.txt,
parse_json.m
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
04 May 2009 Rene

it isn't working.
i got this:
gtranslate('Good morning Mr. Peterson, how is your cat?','sv')
??? Error using ==> urlread at 108
Error downloading URL.

Error in ==> gtranslate at 43
page = urlread(url, 'get', {'v', '1.0','q', inputString, ...

but should be a funny tool, if it would run

04 May 2009 Michael Katz

I added the wrong file, please wait for the update to get approved. Otherwise download the JSON Parser from http://www.mathworks.com/matlabcentral/fileexchange/23393

10 Jul 2009 Husam Aldahiyat

Nice one.

Please login to add a comment or rating.
Updates
04 May 2009

originally uploaded wrong helper files.

10 Jul 2009

added trademarks

10 Jul 2009

added trademark

Tag Activity for this File
Tag Applied By Date/Time
language Michael Katz 04 May 2009 10:33:03
translation Michael Katz 04 May 2009 10:33:03
web Michael Katz 04 May 2009 10:33:03
google Michael Katz 04 May 2009 10:33:03
gui Michael Katz 04 May 2009 10:33:03
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com