Click here to Skip to main content
15,909,039 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi to all,

I want to translate a whole web page from one language to another language, like google translator.

Anybody know how can I do it?

[Thanks in advance]

Thank you Mr.Dalek Dave. It useful to me.
But in my code i have to process translation operation using google translator api. I have to read a web text using WebClient class. When i translate those whole page, that time throw some GoogleApiException. I don't know the reason.
This is my coding

WebClient wc = new WebClient();
string code = wc.DownloadString("http://www.google.com");
try
{
Console.WriteLine(Translator.Translate(code, Language.English,
Language.French, TranslateFormat.html));
}
catch (GoogleAPIException e)
{
Console.WriteLine(e.ToString());
}


I anybody know the reason reply me...


[Thanks in advance]
Posted
Updated 16-Nov-10 1:12am
v4
Comments
Dalek Dave 16-Nov-10 4:44am    
Edited for Grammar and Readability.

hi,

you can see this

http://www.codeproject.com/KB/IP/GoogleTranslator.aspx[^]

good luck

jerem
 
Share this answer
 
Comments
Dalek Dave 16-Nov-10 5:09am    
Good Old CP Archive!
Sandeep Mewara 16-Nov-10 11:38am    
OP posted an answer for followup. Please have a look,
Thank you Mr.Dalek Dave. It useful to me.
But in my code i have to process translation operation using google translator api. I have to read a web text using WebClient class. When i translate those whole page, that time throw some GoogleApiException. I don't know the reason.

This is my coding

WebClient wc = new WebClient();
string code = wc.DownloadString("http://www.google.com");
try
{
   Console.WriteLine(Translator.Translate(code, Language.English, 
                   Language.French, TranslateFormat.html));
}
catch (GoogleAPIException e)
{
  Console.WriteLine(e.ToString());
}



I anybody know the reason reply me...

[Thanks in advance]
 
Share this answer
 
Comments
Sandeep Mewara 16-Nov-10 11:38am    
Posting as an answer would not inform answerer. Posting as comment will notify via an email.

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