Click here to Skip to main content
15,892,965 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How do I integrate Google translator in C#.net?

I visited http://forum.codecall.net/topic/64790-c-translator-using-google-api/[^] but not solved
Posted
Updated 27-Jun-12 3:10am
v2

The Google Translator is no longer available as a free service. Instead, the new API is only available as a paid service. See here for more information:

https://developers.google.com/translate/[^]

The code you referenced above would work with the old API, which is no longer available.
 
Share this answer
 
Comments
Rajeev Jayaram 27-Jun-12 10:54am    
+5
Huh! "Everything from google is not free!"
Sergey Alexandrovich Kryukov 27-Jun-12 12:34pm    
For a free way, please see my answer.
--SA
Sergey Alexandrovich Kryukov 27-Jun-12 12:33pm    
My 5 but -- it could also be done for free via Web scraping; please see my answer.
--SA
Check this^ out
 
Share this answer
 
If you don't want to pay for Google paid service (please see Solution 1 by Tim Corey), you can still use the Google Translate Web page itself, http://translate.google.com/[^].

As you can note, the text to be translated and language IDs are passed to this page via the URL parameters. You can send HTTP request using the class System.Net.HttpWebRequest, read HTTP response and parse it to extract the translation. Please see:
http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.aspx[^],
http://msdn.microsoft.com/en-us/library/system.net.webrequest.aspx[^] (see HTTP code sample here).

This is a bit ugly but will work. This is a very simple case of Web scraping, http://en.wikipedia.org/wiki/Web_scraping[^].

Please see also my past answers to related questions:
get specific data from web page[^],
How to get the data from another site[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900