[Help] how to make a form Multilingual? [solved]

Posts 1–15 of 16 · Page 1 of 2
[Help] how to make a form Multilingual? [solved]
Another question xD.

I have 2 buttons 1 for Greek and 1 for English. I want when i click the English button the whole form changes from Greek to English...

i was thinking smthn about strings but i dont know how to use it ;s

Thanks in advance
~arcanan
Guess you'd have to hardcode a method to convert the text on all controls to whatever language. Never know, there may be an addon you can use.
The easiest way to me:

have a function that read text from a textfile, and use that text replace the text on buttons.

e.g;
button1=start
button2=stop
button3=end
label1=click me

and then you can just ask users to fill in one of the files in their language and you got a multi language program.
Quote Originally Posted by Jason View Post
Guess you'd have to hardcode a method to convert the text on all controls to whatever language. Never know, there may be an addon you can use.

looooooooool



It's pretty simple... All you have to do is a simple comand (this is the easyest way I can think of for small programs)...

When the "english" button is clicked change label1.text (or whatever) to english....

eg.
To English -

Code:
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles Button1.Click

Label1.Text = " OMG! Its EnglisH!"

End Sub
To greek -

Code:
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles Button1.Click

Label1.Text = " SAme thing but in greek... desculpa ai, não sei falar grego :)"

End Sub
Or you can use what Erinador said... but for begginers, I think this one is easyer... (i'm assuming you are a begginer since you don't know how to use strings... I'm sorry if your not...)
Quote Originally Posted by TheRealOne View Post
looooooooool



It's pretty simple... All you have to do is a simple comand (this is the easyest way I can think of for small programs)...

When the "english" button is clicked change label1.text (or whatever) to english....

eg.
To English -

Code:
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles Button1.Click

Label1.Text = " OMG! Its EnglisH!"

End Sub
To greek -

Code:
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles Button1.Click

Label1.Text = " SAme thing but in greek... desculpa ai, não sei falar grego :)"

End Sub
Or you can use what Erinador said... but for begginers, I think this one is easyer... (i'm assuming you are a begginer since you don't know how to use strings... I'm sorry if your not...)
Um, did you not read my post...you're doing exactly what I said to do; hardcoding the changes
.NET Framework provides diverse classes for Globalization. I developed this part for a project I am working on (simplex). I am on laptop atm. Will post code here as soon I'll get on desktop.
You must do something like:

[PSEUDOCODE]

ButtonEnglish_click :
Greektext = EnglishText

And to Greek to the reverse ^^

Like:
To English:
Label1.Text = "Login"
Button1.Text = "Close"

etc..

For each control in your form change the text when you click it..
I always used strings.....Like make a global declaration of a string value...
Code:
Dim Language As String
Find a way to set to 'Language' a certain value like 'Albanian' or 'English' or 'Italian' or etc..
And In a button:
Code:
If Language = "English" Then
            Label1.Text = "Hello!"
End If
Well this is more if you want to get more into advanced parts like if u want to put the language options in a .ini file....IDK..Gonna make a tut asap those things are really important and easy to do. But U need to know something before, and not going to string formatting, etc in the first day.
thanks guys
Quote Originally Posted by arcanan View Post
thanks guys
Check in the tutorial section...My 2nd tut is now done
Well I'm sure in VB2010 I saw a language form change thing I'm not sure how though
after 30min of hardcoding i manage to translate the 1st form xD
So, solved then?
yeah, solved thanks
Alrighty, marked as solved so unless you have a better solution (Hassan....) please don't bother posting.
Posts 1–15 of 16 · Page 1 of 2
This thread is closed for replies.

Tags for this Thread

None

Talk with us