Iwant to convert a english name to malayalam in a buttonclick event and display on textbox (using C# .net wndows Application)
//I am using the code for converting the name "Nimmi" to malayalam using this but out put is in encoding form
.How to solve this
.How to solve this
public string TranslateTextNew(string input, string languagePair)
{
string url = String.Format("http://www.google.com/translate_t?hl=en&ie=UTF8&text={0}&langpair={1}", input, languagePair);
WebClient webClient = new WebClient();
webClient.Encoding = System.Text.Encoding.UTF8;
string result = webClient.DownloadString(url);
result = result.Substring(result.IndexOf("
result = result.Substring(result.IndexOf(">") + 1);
result = result.Substring(0, result.IndexOf(""));
return result.Trim();
}
private void button3_Click(object sender, EventArgs e)
{
translation obj = new translation();
string rs = obj.TranslateTextNew("nimmi", "en|ml");
textBox1.Text = rs;
}
Replies
Know the answer? Post it — somebody with the same question will find it here.