-2

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 ;)

Kaneki
  • 89
  • 1
  • 3
  • Can you make your problem a little more clearer? For me it's hard to understand what's your problem. – zgue Sep 09 '17 at 16:58
  • @zgue i have a text file that have 100k words like this ||English : xyster|| || لقي: گشتي || || كوردي: ئامێري ئيسقان كڕاندن (پزيشكەواني)|| || وردەكاري: ئامێري ئيسقان كڕاندن (پزيشكەواني)|| || and i have two text boxes in my program i want to get data from the txt file while the textboxs text equals to yttrium the other text boxs text = لقي: گشتي كوردي: ئامێري ئيسقان كڕاندن (پزيشكەواني) وردەكاري: ئامێري ئيسقان كڕاندن (پزيشكەواني) i want to it to get the data from the first texbox and translate it based on the txt file that i have and write it in the second textbox – Kaneki Sep 09 '17 at 17:17

1 Answers1

1

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
nikhil
  • 616
  • 8
  • 22