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 180847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T14:39:29+00:00 2026-05-11T14:39:29+00:00

Having nicked some code from msdn I’m miffed that it doesn’t work exactly as

  • 0

Having nicked some code from msdn I’m miffed that it doesn’t work exactly as I want straight away. I’m trying to use google translate to, well, translate some stuff for me on the fly. The problem is that t5he responseFromServer doesn’t contain the translated text, nor does the source when I look at it using a browser although when looking at the page itself chien is proudly displayed.

void getTranslation()     {         WebRequest request = WebRequest.Create('http://translate.google.com/translate_t?hl=en#en|fr|dog');         // Get the response.         WebResponse response = request.GetResponse();         // Display the status.         Console.WriteLine(((HttpWebResponse)response).StatusDescription);         // Get the stream containing content returned by the server.         Stream dataStream = response.GetResponseStream();         // Open the stream using a StreamReader for easy access.         StreamReader reader = new StreamReader(dataStream);         // Read the content.         string responseFromServer = reader.ReadToEnd();         int index = 0;         while (responseFromServer.Substring(index).Contains('dog'))         {             index = responseFromServer.IndexOf('dog', index + 1);             Console.WriteLine(responseFromServer.Substring(index < 50 ? 0 : index - 50, 100));             Console.WriteLine(' ');         }     } 

Does anyone know what I’m failing to understand here? Or of a website that returns a translation as simple as the request?

  • 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. 2026-05-11T14:39:30+00:00Added an answer on May 11, 2026 at 2:39 pm

    The reason is that the translation request itself is an asynchronous AJAX request. If you view the source of the page you are trying to retrieve, you won’t find the word chien.

    You could take a look at the Google AJAX Language API to achieve what you want.

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

Sidebar

Related Questions

Having some trouble w/ IE7. IE8, Chrome, Firefox all work fine, but IE7 won't
Having some invokeMethod that takes in (java.lang.String method_name, Object[] params, Class[] params_classes) How would
Having some trouble getting a JSON feed to load from my site. I'm starting
Having trouble with each function... Will try to explain by example... In my code,
Having trouble accessing javascript code in a mixed html/js ajax response. jQuery ajax doc
Having difficulty with getting Flowplayer to work nicely with RTMP. This is currently my
Having a list of 3-tuples : [(a, b, c), (d, e, f)] I want
Having the following code: int main(int argc, char* argv[]) { // program code std::cout
having some trouble with hitTestObject and now Flash is telling me it can't convert
Having (presumably) understood the motivation behind Nuget, I want to know, whether we still

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.