How do I use the google translate API with iOS 6.0? I have tried googling the documentation and tried to research it, but I can't find anything that is updated since google made the api to be no longer free.
The only thing I have been able to find was this, but it didn't really help much because I need to use the api key that I have, but I have no idea how to.
http://www.raywenderlich.com/1448/how-to-translate-text-with-google-translate-and-json-on-the-iphone
This seems up to date: https://developers.google.com/translate/v2/getting_started
(completely meta: Oops! Your answer couldn't be submitted because: body must be at least 30 characters; you entered 23)
Yes, it is. Once you get your Google key, just plug it into FGTranslator. Note, generate a "server" key, since the Google Translate API does not currently support iOS keys.
It's just a one-line call to the translate function after that.
FGTranslator *translator = [[FGTranslator alloc] initWithGoogleAPIKey:@"your_google_key"];
[translator translateText:@"Bonjour!"
completion:^(NSError *error, NSString *translated, NSString *sourceLanguage)
{
NSLog(@"translated from %@: %@", sourceLanguage, translated);
}];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With