-
Hi,
Can anyone give me some suggestions on how to make my VB application language independent?
The user shall be able to select a language and all labels, comandbuttons etc. from now on within the app. shall appear in the selected language.
Today I am retrieving all labeles from a database and are then looping through and changing the cpation for all controls within the form before it is displayed.
Isn't there an easier/better way of doing this?
Please help me, Thanks,
Jess
-
Hi jess!
I can suggest u to use resource files.Recource files can be very useful for independant language programs.
(I don't have the code but as far as i remember...)
firstly create a resource file for your program and then create tables fou different languages where the ID numbers are every label you want.Then in the program before displaying the form use:
MyString=LoadResString(id number)
It returns the string of the diffult language in the computer where the program is installed.
For Example
Table 1 ID 1:File(English)
Table 2 ID 1:Arxeio(Greek)
Table 3 ID 1:skjdfhkjsh(French)
MyString=LoadResString(1)
returns <<skjdfhkjsh>>if the computer has french installed
if not...
returns <<Arxeio>>if the computer has Greek installed
if not...
returns <<File>>if the computer has English installed
mnuFiles.Caption=LoadResString(1)
Did u understand how it works?