Hi
I m from bangladesh. I want to develop a software for bangla language. I mean for bangla typing. similar to google indic bangla. But little different and offline use. I mean system keyboard software. But Not Microsoft keyboard creator. I want to make it by vb.net. So plz give me guideline

thank you

Hi.
This was my first attempt at creating a translation software so I hope the following project sample is of use.
Hopefully I got the correct words for the translations and not something else. :D

'// Pre-requisites: 2 buttons, 1 richtextbox \\
Public Class Form1

    Private translateTo As String = "English" '// determine which language to translate to.
    Private myTranslationList As New List(Of String) '// list for your translations.

    Sub addTranslationsToList()
        With myTranslationList
            '// add complete sentences First.
            .Add("What are you doing today?~আপনি আজ কি করছেন?")
            .Add("How are you?~আপনি কেমন?")

            'add words starting with the longest word First.
            .Add("where~কোথায়") : .Add("what~কি") : .Add("when~কখন") : .Add("how~কিভাবে") : .Add("why~কেন")

            '// add the single characters last.
            .Add("a~একটি") : .Add("b~b") : .Add("c~সি") : .Add("d~৪") : .Add("e~৫")
            .Add("1~১") : .Add("2~২") : .Add("3~৩") : .Add("4~৪") : .Add("5~৫")
        End With
    End Sub

    Sub beginTranslation()
        If translateTo = "English" Then
            For Each translation As String In myTranslationList
                Dim myCoolIndex As Integer = 0
                Dim myArray() As String = translation.Split("~") '// separate English from Bengali in each string.
                translation = myArray(1) '//get the Bengali word(s).
                Do Until myCoolIndex = -1 '// loop until "myCoolIndex" is returned to the start of the search.
                    myCoolIndex = Me.RichTextBox1.Find(translation, myCoolIndex, RichTextBoxFinds.WholeWord) '// locate word(s).
                    If Not myCoolIndex = -1 Then
                        RichTextBox1.SelectionStart = myCoolIndex '// start selection.
                        RichTextBox1.SelectionLength = translation.Length '// end selection.
                        RichTextBox1.SelectedText = myArray(0) '// change words to English.
                        myCoolIndex += 1  '// next word.
                    End If
                Loop
            Next
        ElseIf translateTo = "Bengali" Then
            For Each translation As String In myTranslationList
                Dim myCoolIndex As Integer = 0
                Dim myArray() As String = translation.Split("~") '// separate English from Bengali in each string.
                translation = myArray(0) '// get the English word(s).
                Do Until myCoolIndex = -1 '// loop until "myCoolIndex" is returned to the start of the search.
                    myCoolIndex = Me.RichTextBox1.Find(translation, myCoolIndex, RichTextBoxFinds.WholeWord) '// locate word(s).
                    If Not myCoolIndex = -1 Then
                        RichTextBox1.SelectionStart = myCoolIndex '// start selection.
                        RichTextBox1.SelectionLength = translation.Length '// end selection.
                        RichTextBox1.SelectedText = myArray(1) '// change words to Bengali.
                        myCoolIndex += 1 '// next word.
                    End If
                Loop
            Next
        End If
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        addTranslationsToList() '// populate list.
        Button1.Text = "English" : Button2.Text = "Bengali"
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        translateTo = "English"
        beginTranslation()
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        translateTo = "Bengali"
        beginTranslation()
    End Sub
End Class

For quick evaluation, copy and paste the code from the "addTranslationsToList()" Sub since it contains both English and Bengali words.

Almost forgot.
Each item added to the list is separated by the ~ character, which allows the separation for later use.

Also, the reason why you should add the longest sentences/words first is for the application not to first replace letters within words and words within sentences but the other way around.

create the buttons in design mode and set every button text to a certain letter than in the event of each button you just write
textbox1.text += buttonX.text
you could make just one event for all the buttons

sub button_clicked(ByVal sender As System.Object, ByVal e As System.EventArgs) handles btn1.click,btn2.click,...
dim btn as button = sender
textbox1.text &= btn.text
end sub

for other button such as space tab .. you can handle their events with separate subs
good luck

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.