I want just make translator from English language to Arabic or Urdu
just a dictionary there is one text box and one label and one button.when enter some text in text box and click button label show the translate of this text.
i hope Mitja You understood the problem .
If I understood you correctly, and yuou have a HashTable as a dictionary (key and value; key is written name into textBox, value is translated word, which will be shown in a label), then this is the code you want:
public partial class Form1 : Form
this.label1.Text = "";
private void CreateDictionary()
table = new System.Collections.Hashtable();
private void button1_Click(object sender, EventArgs e)
string word = this.textBox1.Text;
foreach (System.Collections.DictionaryEntry dic in table)
if (word == dic.Key.ToString())
this.label1.Text = dic.Value.ToString();
You cannot translate a language into another by just using word translation.
You could get strange things by doing so.
Even two rather "similar" languages as Dutch and English have their differences.
"Waar heb je je autosleutels gelaten?" a perfect Dutch sentence,
would become translated word by word: "Where have you you carkeys left?" in perfect English(I hope :S) "Where did you leave your carkeys?"
Did you also think about the conjugations of the verbs etc.?
This is best code but this is not converting English text into French or Hindi
Mitja ..Please send more like translator
I dont know what do you mean?
I told you Iam not sure what exactly would you like to do, but with creating your own translator, you will have to put all words into it; I thought you will use a hastTable as for the tool of translation. Key will be used as the written word, and value as translation word.
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...