How to launch "Google Translate" app?
is it possible?
Thank you.I don't know what url scheme supported by the google translate app but you can open the iTranslate app using this -
To launch the application:
NSString *stringURL = @"itranslate://";
NSURL *url = [NSURL URLWithString:stringURL];
[[UIApplication sharedApplication] openURL:url];
To translate a 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 have a look on this - http://wiki.akosma.com/IPhone_URL_Schemes
The url scheme for google translate is googletranslate://
精彩评论