get data from a .txt file and write it on a textbox

137 views Asked by At

I am trying to create a language translator I have the texts that translated the word that I need here is an example of what is inside my text file https://pastebin.com/LBv76w2f and I have two text boxes in my program, I want to get data from the text box and write it in the second text box based on the text file that I have the words in it something like

if (englishtextbox.Text == "yttrium") { kurdishtxtbox.Text = "لقي: پزيشكي" + "\r\n" + "كوردي: هێماي كيميايي ييتريۆمە" + "\r\n" + "وردەكاري: هێماي كيميايي ييتريۆمە ";

}

but you know I don't like to type 100 000 else ifs. thanks for help ;)

1

There are 1 answers

0
nikhil On

Create a table with 2 fields in DB

Column_1 column_2

Then use query

Select column_2 from table where column_1 = englishtextbox.Text