Now, many software provide a variety of language interfaces to choose from, making it easy to use people in different countries. In fact, software that supports multilingual interfaces is only a language file corresponding to different languages. The software can display the corresponding language interface by reading the corresponding file. The CAPTION property can be modified by reading the corresponding file in VB. Align = "marginwidth =" 0 "marginheight =" 0 "src =" http://images.chinabyte.com/adjs/iframe-pip/y-software-pip.html "frameborder =" 0 "width =" 360 "scrolling =" no "height =" 300 ">
The following example introduces the implementation method of the China / English interface in VB, you can give your own software to multi-language interface. First, establish two language files Chinese.leg and English.leg (can be used, the name can be taken casually, as long as it is convenient to distinguish it). Enter the corresponding content, "file" "File", "Welcome", "Open", "File", "EXIT", "Welcome", "Open", each word occupies one line (for easy reading ). Next, open VB6, create a new project, add two Command and a Label to create a menu. Then add a general dialog control to open the corresponding language file.
Dim file As StringDim a3 As StringPrivate Sub caidan2_Click Unload MeEnd SubPrivate Sub Command1_Click Unload MeEnd SubPrivate Sub Command2_Click CommonDialog1.ShowOpen file = CommonDialog1.FileName 'get file path and name Call chang' invocation End SubPrivate Sub CHANG Open File for Input As 1 'Open File for i = 0 To 3 Line Input # 1 Ai' Read Files Next Close 1 Caidan1.caption = A0 'Update Menu Show Caidan2 .Caption = a1 Label1.caption = a 2 update Label display Command1.caption = a1 'Update Command Display Command2.caption = A3END SUB
Note: This program is debugged at VB6 Win2000.