Runtime Switching Overview
Once you have extracted strings and had them translated, you can command VBLM to localize your VB app in two different ways. It can build a static single language version (SLV), in which the only difference from the original is that the design language strings are replaced with translations. It can also build a runtime switched version (RSV), in which the strings are replaced with function calls, stored in a separate database or resource file, and loaded at runtime. An RSV can be single or multilingual. A multilingual RSV gets a language selection at startup by examining the command line, checking the system registry, or asking the user.
You can also configure VBLM to build an RSV that switches interface dimensions as well as languages, and/or that supports switching at any time during execution, rather than just at startup. For more information on these options, see runtime dimension switching and enabling on-the-fly switching, respectively.
To build an RSV, simply check Build Runtime Switched Version on the Build Now page, set the RSV Build Options as desired, and select as many languages on the list as you want included in the database.
When VBLM builds an RSV, it does many things differently than when it simply swaps strings* to build an static single-language version. The best way to thoroughly understand how it all works is to build an RSV, load it into VB, and explore the code. But here's an overview:
The Language Database
VBLM creates either a language database file or a resource file in the target directory. The database file is named LANGUAGE.DAT by default (you can change this) and the resource file is named VBLM.RC/VBLM.RES by default (you can change this too). The file contains all strings in all selected languages, and any dimsets needed to support dimension switching. See The RSV Language Database and/or Using Resource Files for more information about the LDB.
RSV Support Files
Depending on project type, VB version, LDB format, and other settings, VBLM selects appropriate RSV support files from among 20+ supplied, copies them into the target directory, and adds them to the new VB project file. One support file contains the string replacement function, which takes a string index argument and returns a string from the database or resource; the default is VBLM_RTString(), but again, you can change this. See customizing the string replacement function and RSV Support Files. for details.
Power Users: VBLM makes it easy for you to customize and specify runtime support files other than those supplied by WhippleWare. This can be quite useful if you want to make systematic modifications. If you do so, make sure that the files you select provide the necessary functionality.
RSV Code Modifications
When VBLM builds a single language version, the only changes it makes when rewriting your project code in the target directory are string swaps*. When building an RSV, however, VBLM adds, eliminates, and modifies code in various ways to support runtime switching. The changes made depend on the file type, the section within the file, and the build options configuration. Click any of the following for details:
Definition Section, Control Containers & Selected Designers
Declaration Section, All Files
Code Section, Control Containers & Selected Designers
Notes
1) All runtime switching support is implemented in fully-documented VB code that is added and/or modified during the build. This means that you can easily modify the code yourself in anyway you see fit, whether to spruce up the language selection form, to retrieve the language selection from an INI file, or whatever you want.
2) "Control Container Files" are those with a visual interface and which begin with a property & control definition section: forms, user controls, document objects, and property pages.
3) Selected Designers means those designer files that you have configured VBLM to localize. See Working with Designer Files for details.