hi, i'm starting to learn vb.net, and i trying to make some special translating program, its need to translate hebrew text into special letter sequence.
for example:
the text input are: בניית ביניינים מתקדמים
(which its means Construction of advanced buildings
)
And the text output are: BPJJZ_BJPJJPJM_NZWDNJM
according to the list i made (Attached picture).
and i made this code:
Public Class MainForm
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox1.Text.Contains("א") Then TextBox2.Text = TextBox2.Text & "A"
If TextBox1.Text.Contains("ב") Then TextBox2.Text = TextBox2.Text & "B"
If TextBox1.Text.Contains("ג") Then TextBox2.Text = TextBox2.Text & "C"
If TextBox1.Text.Contains("ד") Then TextBox2.Text = TextBox2.Text & "D"
If TextBox1.Text.Contains("ה") Then TextBox2.Text = TextBox2.Text & "E"
If TextBox1.Text.Contains("ו") Then TextBox2.Text = TextBox2.Text & "F"
If TextBox1.Text.Contains("ז") Then TextBox2.Text = TextBox2.Text & "G"
If TextBox1.Text.Contains("ח") Then TextBox2.Text = TextBox2.Text & "H"
If TextBox1.Text.Contains("ט") Then TextBox2.Text = TextBox2.Text & "I"
If TextBox1.Text.Contains("י") Then TextBox2.Text = TextBox2.Text & "J"
If TextBox1.Text.Contains("כ") Then TextBox2.Text = TextBox2.Text & "K"
If TextBox1.Text.Contains("ל") Then TextBox2.Text = TextBox2.Text & "L"
If TextBox1.Text.Contains("ם") Then TextBox2.Text = TextBox2.Text & "M"
If TextBox1.Text.Contains("מ") Then TextBox2.Text = TextBox2.Text & "N"
If TextBox1.Text.Contains("ן") Then TextBox2.Text = TextBox2.Text & "O"
If TextBox1.Text.Contains("נ") Then TextBox2.Text = TextBox2.Text & "P"
If TextBox1.Text.Contains("ס") Then TextBox2.Text = TextBox2.Text & "Q"
If TextBox1.Text.Contains("ע") Then TextBox2.Text = TextBox2.Text & "R"
If TextBox1.Text.Contains("ף") Then TextBox2.Text = TextBox2.Text & "S"
If TextBox1.Text.Contains("פ") Then TextBox2.Text = TextBox2.Text & "T"
If TextBox1.Text.Contains("ץ") Then TextBox2.Text = TextBox2.Text & "U"
If TextBox1.Text.Contains("צ") Then TextBox2.Text = TextBox2.Text & "V"
If TextBox1.Text.Contains("ק") Then TextBox2.Text = TextBox2.Text & "W"
If TextBox1.Text.Contains("ר") Then TextBox2.Text = TextBox2.Text & "X"
If TextBox1.Text.Contains("ש") Then TextBox2.Text = TextBox2.Text & "Y"
If TextBox1.Text.Contains("ת") Then TextBox2.Text = TextBox2.Text & "Z"
If TextBox1.Text.Contains(" ") Then TextBox2.Text = TextBox2.Text & "_"
If TextBox1.Text.Contains("?") Then TextBox2.Text = TextBox2.Text & "?"
If TextBox1.Text.Contains("!") Then TextBox2.Text = TextBox2.Text & "!"
End Sub
End Class
but there is a problem, its translate only one letter, for example:
im translating this sentence: בניית ביניינים מתקדמים
(which its means Construction of advanced buildings
)
and i get this word: BDJMNPWZ_
when the text output are should be like this: BPJJZ_BJPJJPJM_NZWDNJM
can somebody help me with this problem?
thx, man1919.