Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4562838
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T18:16:21+00:00 2026-05-21T18:16:21+00:00

when I run the following google translation API URL http://translate.google.com/translate_a/t?client=t&text=Hello&langpair=en|fr it returns the correct

  • 0

when I run the following google translation API URL http://translate.google.com/translate_a/t?client=t&text=Hello&langpair=en|fr it returns the correct result.

However, when I try to use the following in Xcode it returns (Null). I would appreciate any help or insight you can provide.

NSString *urlPath = [NSString stringWithFormat:@"/translate_a/t?client=t&text=%@&langpair=en|fr",@"Hello"];

NSURL *url = [[NSURL alloc] initWithScheme:@"http" host:@"translate.google.com" path:urlPath];

NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] init] autorelease];
[request setURL:url];
[request setHTTPMethod:@"GET"];

NSURLResponse *response;
NSError *error;
NSData *data;
data = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error];

NSString *result = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; 

NSLog(@"Text: %@",result);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T18:16:22+00:00Added an answer on May 21, 2026 at 6:16 pm

    Your encoding is incorrect. change it to NSASCIIStringEncoding.

    I just fixed your code and ran it locally and it worked like a charm…

    here are the results

    [[[“Bonjour”,”Hello”,””,””]],[[“interjection”,[“bonjour”,”salut”,”all\u00f4″,”tiens”]]],”en”,,[[“Bonjour”,[5],1,0,1000,0,1,0]],[[“Hello”,4,,,””],[“Hello”,5,[[“Bonjour”,1000,1,0]],[[0,5]],”Hello”]],,,[],1]

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My goal is to understand every single bit of the following example: http://code.google.com/p/google-api-java-client/wiki/AndroidAccountManager I
I want to run Dojo/Dijit with the Google CDN: <script type=text/javascript src=http://ajax.googleapis.com/ajax/libs/dojo/1.3.2/dojo/dojo.xd.js> </script> I've
i am trying to run google map tutorial using following link http://mobiforge.com/developing/story/using-google-maps-android followed all
i'm using a maven project with following dependency : <dependency> <groupId>com.google.api.client</groupId> <artifactId>google-api-client-googleapis-auth-clientlogin</artifactId> <version>1.2.3-alpha</version> </dependency>
I'm trying to run the following query: insert into visits set source = 'http://google.com'
I've been following the beginner PlayN tutorial at http://code.google.com/p/playn/wiki/BeginnerInstallationGuide So basically I've downloaded PlayN
I am using google-api-client to access Google calendar. Following are the permissions in my
I get the following error when I try to run sample example of Google
I get the following error: Exception in thread main java.lang.NoSuchMethodError: com.google.common.collect.ImmutableSet.of([Ljava/lang/Object;)Lcom/google/common/collect/ImmutableSet; at com.google.gdata.wireformats.AltFormat$Builder.setAcceptableTypes(AltFormat.java:399) at
I've been working on a statistical translation system for haiti (code.google.com/p/ccmts) that uses a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.