4.0 | 4 ratings Rate this file 27 Downloads (last 30 days) File Size: 3.7 KB File ID: #23988

Google(R) Translate



04 May 2009 (Updated )

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

| Watch this File

File Information

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.


(Another) Json Parser inspired this file.

MATLAB release MATLAB 7.8 (R2009a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (9)
15 Mar 2014 mohamed hamdy

dosn't work can you update this code
to translate from english to arabic plz

18 Jun 2013 Shahar

Doesn't work, return error
Page = "Suspected Terms of Service Abuse. Please see http://code.google.com/apis/errors", "responseStatus": 403}"

02 Dec 2011 AComunity

is there any other than google translate...?
coz now google translate web service become paid service...

17 Jun 2011 Michael Katz

@Yuri, @hanan,

I believe this a limitation of the font that is only able to show latin characters. I am not sure how to change the font for GUI controls.

06 Jun 2011 hanan

not working when I translate from English to Arabic.

Any Help?

06 Oct 2010 Yuri K

Cool! Works well with latin characters languages. Any idea how to translate to/from let's say russian, japanese?

10 Jul 2009 Husam Aldahiyat

Nice one.

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

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

originally uploaded wrong helper files.

10 Jul 2009

added trademarks

10 Jul 2009

added trademark

Contact us