Hi,
I am writing an application in VB6.0 that will have the option to
select the language. For instance when Spanish is selected all the
text on the program interface will display in Spanish.
This is easy to do for the majority of the text on a form. I just put
the following code in Form_Load:
If language = “English” then
CmdOK.Caption = “OK”
etc
Elseif language = “Spanish” then
CmdOK.Caption = “Aceptar”
etc
End if
However I have a problem with the main drop down menu (i.e.
File/Edit/View etc). I did something similar to the above to change
the text however there are two other problems that I cannot see any
solution to:
1. I want underscores under letters in the various options so I can
activate the option with Alt+Letter. This is normally done in the menu
editor by placing a & in front of the letter. This does not seem to
work when I change the caption at run time. The & seems to be ignored.
2. For a given option in the menu the standard shortcut for English
and Spanish are different. For example Open (Ctrl+O) in English and
Abrir (Ctrl+A) in Spanish. How can I change the shortcut at run time ?
I not the first person to write a multilingual program … how is
this normally done – am I going about this in the right way ?
Thanks,
Stephen
I am writing an application in VB6.0 that will have the option to
select the language. For instance when Spanish is selected all the
text on the program interface will display in Spanish.
This is easy to do for the majority of the text on a form. I just put
the following code in Form_Load:
If language = “English” then
CmdOK.Caption = “OK”
etc
Elseif language = “Spanish” then
CmdOK.Caption = “Aceptar”
etc
End if
However I have a problem with the main drop down menu (i.e.
File/Edit/View etc). I did something similar to the above to change
the text however there are two other problems that I cannot see any
solution to:
1. I want underscores under letters in the various options so I can
activate the option with Alt+Letter. This is normally done in the menu
editor by placing a & in front of the letter. This does not seem to
work when I change the caption at run time. The & seems to be ignored.
2. For a given option in the menu the standard shortcut for English
and Spanish are different. For example Open (Ctrl+O) in English and
Abrir (Ctrl+A) in Spanish. How can I change the shortcut at run time ?
I not the first person to write a multilingual program … how is
this normally done – am I going about this in the right way ?
Thanks,
Stephen
Comment