Change website language
string text = "我喜欢跑步。";
TranslateClient client = new TranslateClient(/* Enter the URL of开发者_Python百科 your site here */);
string translated = client.Translate(text, Language.ChineseSimplified, Language.English);
Console.WriteLine(translated); // I like running.
It is working fine. But I want to pass whole site as an input and convert into selected language. How can I do this?
Ex : http://translate.google.com/#
You may need to fetch the page contents yourself, for instance using HttpRequest, strip it by HTML elements (with a simple regular expression), then feed it the text to code that does the translation.
精彩评论