Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
I have a web page, that contains a text box -
users have to enter some ENGLISH text into this textbox,
this data is to be

1. stored (when submit pressed)into SQL server database
2. Later I have to retrieve this data from database and show into a web page in the Chienes or English language.
as he select the language from dropdownlist.
how it is possible
Posted
Updated 13-Mar-11 20:16pm
v2

You are posting the same question again[^].

Modify the existing question rather than creating a new one.


UPDATE SM:
Abinav's reply earlier: This[^] third party might help you.
 
Share this answer
 
v2
Comments
Sandeep Mewara 14-Mar-11 2:33am    
5!

Because I just deleted it because of a repost. Sorry!
Sandeep Mewara 14-Mar-11 2:34am    
Updated here with your answer.
Abhinav S 14-Mar-11 3:05am    
Sure no problem.
Thanks for the effort to copy my answer. :)
You cannot convert some data on the fly from one language to other. You are storing the data in English and so retrieving in any language would give you English text only. Even if you localize your database - it will just hole the data in that localized language and not convert anything coming into it from another language.

If you need translation of data then you need to do it by yourself in code and then store the same. Or translate it before showing back. Generally, defined words or sentences can be easily localized but translating a free form text which can be anything entered by the user would be difficult to do.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 14-Mar-11 2:18am    
Reasonable. My 5.
--SA
Sandeep Mewara 14-Mar-11 2:32am    
Thanks SA.

But, I guess OP needs a CODE... downvoted me..

BTW, OT:
I have yet to look into your question that you posted. I want to try it.
Sergey Alexandrovich Kryukov 14-Mar-11 2:36am    
OP keeps to repeat question. Please see. I recommend to remove it if you think this is the same. Apparently OP ignores your Answer (maybe even down-votes).
--SA
Sandeep Mewara 14-Mar-11 2:38am    
Yeah, I do it on constant basis for questions I find duplicate/repost. Further, after couple of times... add to BL!
Sergey Alexandrovich Kryukov 14-Mar-11 2:44am    
Add to... to what (please don't abbrv. :-)?
OP keeps adding Question in different form; was Chinese, not French. I think this is a trick.
Bad behavior, would not surprise he also down-votes. Remove the question, that's is.
--SA
For one of my projects i once used google translate services. Though not very accurate, as long as your grammar is very strict on your website "da beatz is jammin on da streetz" will most likely not work.

But this way you dont need to set up a database as it is constantly improved.

But if you are going for the multilingual option and doing it yourself. you are going to need to for each content variation include a foreign key to language and combine the foreign key with the current primary key.

eg:

Content table
Fields:
id (pk)
langid (fk)(pk)
content


Language table
Fields:
langid(pk)
name
 
Share this answer
 
Comments
Sandeep Mewara 14-Mar-11 2:39am    
For one of my projects i once used google translate services. Though not very accurate, as long as your grammar is very strict on your website "da beatz is jammin on da streetz" will most likely not work.
This is what I tried to tell OP.
Sergey Alexandrovich Kryukov 14-Mar-11 3:46am    
Some languages are easier, like English. In case of my native language the results of translations from/to any other language is a permanent source of jokes.
--SA
Try this. Hope it works..

Using System.Data.SqlClient;

1.)
string constr ="server=your_server_name; DataBase=database_name; uid=; pwd=;" ;
SqlConnection conn = new SqlConnection(constr);
string cmdstr = "select *from table";
SqlDataAdapter da = new SqlDataAdapter(cmdstr,conn);
DataSet ds = new Dataset();
da.Fill(ds,"table");
Datatable dt = ds.Tables["table"];

dt.Rows[0][0] = TextBox1.Text;

con.Dispose();



2.)
Then Use the same code, just modify the statement:

TextBox1.Text = dt.Rows[0][0].ToString();
 
Share this answer
 
Comments
Sandeep Mewara 14-Mar-11 3:15am    
How will this help? Can you explain please?
Raj.rcr 14-Mar-11 4:53am    
According to his requirement, this is just an idea.. I think, OP can use this for dropdownlist and also the textbox..
Sandeep Mewara 14-Mar-11 5:04am    
His whole question is related to localization... nothing here of how to retrieve a data.
Raj.rcr 14-Mar-11 5:15am    
Atleast, OP should have replied for any of the answers or comments posted here.. I think u r right..
Sandeep Mewara 14-Mar-11 5:52am    
:) I guess so.

He just need code.

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