How to run the Google Translate app?


I would like to launch the Google Translate application when a user clicks a button in my application.

Is it possible?


Thank.

+3
source share
2 answers

URL scheme for google translation GoogleTranslate: //

+1
source

I don't know which url scheme is supported by google translate application, but you can open iTranslate application using this -

To launch the application:

NSString *stringURL = @"itranslate://";
NSURL *url = [NSURL URLWithString:stringURL];
[[UIApplication sharedApplication] openURL:url];

To translate text:

NSString *textToTranslate = @"Hello world"; // Text must be URL-encoded...!
textToTranslate = [textToTranslate stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSString *test =  [NSString stringWithFormat:@"itranslate://translate?from=en&to=de&text=%@",textToTranslate];
NSURL *url = [[NSURL alloc] initWithString:test];
[[UIApplication sharedApplication] openURL:url];

also look at this - http://wiki.akosma.com/IPhone_URL_Schemes

+2
source

All Articles