In many sites we save HINDI data in a SQL data base. But is too difficult to insert a HINDI font into data base. I tried to solve this problem. Then this works exactly.First create one table tbhindi in sql 2000First create columns sno , username, fullname.In the fullname column I store Hindi (UNICODE).Then create a new WEBSITE. In A WebsiteFirst you add a Google API for translating English to any language. On this location click on this link:http://code.google.com/p/google-language-api-for-dotnet/downloads/detail?name=GoogleTranslateAPI_0.1.zip On this link you download GoogleTranslateAPI_0.1.zip folder. Then create in a website a bin folder and put GoogleTranslateAPI.dll & Newtonsoft.Json.dll after adding a bin folder with .dll then you create your .aspx page.In .aspx pageFirst add controls; a textbox, a Button, a Label and a Girdview.After naming the control write code for the Button.On a Button1_Clickprotected void Button1_Click(object sender, EventArgs e) { string Text = TextBox1.Text; Console.WriteLine("Before Translation:{0}", Text); Text = Google.API.Translate.Translator.Translate(Text, Google.API.Translate.Language.English, Google.API.Translate.Language.Hindi); Label1.Text = Text;
string constr1; IFormatProvider culture = new CultureInfo("fr-Fr", true); constr1 = ConfigurationManager.ConnectionStrings["constr"].ConnectionString; con = new SqlConnection(constr1); con.Open(); string sql = "insert into tbHindi(username,Fullname) values('" + TextBox1.Text + "',N'" + Label1.Text + "')"; cmd = new SqlCommand(sql, con); int res; res = cmd.ExecuteNonQuery(); res = 1; con.Close(); GridView1.DataBind(); }ConclusionI think that's the solution to help for you.
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: