0
string text = "我喜歡跑步。";
TranslateClient client = new TranslateClient(/* Enter the URL of your site here */);
string translated = client.Translate(text, Language.ChineseSimplified, Language.English);
Console.WriteLine(translated); // I like running.
這是工作的罰款。但我想將整個站點作爲輸入並轉換爲選定的語言。我怎樣才能做到這一點?更換語言
例:http://translate.google.com/#
其實當我嘗試通過我的網頁源代碼這樣 WebClient wclient = new WebClient(); wclient.Headers.Add(「user-agent」,「Mozilla/4.0(compatible; MSIE 6.0; Windows NT 5.2)」); 流數據= wclient.OpenRead(「http://www.google.com」); StreamReader reader = new StreamReader(data); string s = reader.ReadToEnd(); string text = s; TranslateClient client = new TranslateClient(/ *在此處輸入您網站的網址* /); string translated = client.Translate(text,Language.ChineseSimplified,Language.English); Console.WriteLine(translated); Plz – Nagu 2009-11-02 09:20:39
Plz檢查上面的代碼顯示錯誤 – Nagu 2009-11-02 09:22:42