Getting google translate api for iphone

I want to use google translate api from iphone.

what i found: http://code.google.com/p/gdata-objectivec-client/

but in the list I do not see the api broadcast.

Where can I find the library?

thanks.

+5
source share
5 answers

The Google Language API is provided as a web service. For non-javascript environments, you should use JSON to communicate with Google servers.

It seems that there is no Objective-C wrapper for this function (for example, the ones you sent), so you have to minimize it yourself. Fortunately, JSON is pretty easy to use on the iPhone.

+4

objective-c Google Translator PLTranslator. http://github.com/xhan/PLTranslator

+10

JSON Stig Brautasets ( 2.2), JSON. JSON Google Translate , NSScanner.

0

Google, FGTranslator.

FGTranslator *translator = [[FGTranslator alloc] initWithGoogleAPIKey:@"your_google_key"];

[translator translateText:@"Bonjour!" 
               completion:^(NSError *error, NSString *translated, NSString *sourceLanguage)
{
    if (error)
        NSLog(@"translation failed with error: %@", error);
    else
        NSLog(@"translated from %@: %@", sourceLanguage, translated);
}];
0

All Articles