Multi-Language Add-In for Visual Basic 6
Major Features
Add localization support late in development
All localization experts recommend planning localization right from the beginning of your software development project. Most software developers do not follow this advise. Often, the requirement to localize a project is not even raised before the development has been completed.
Controls database to specify localizable properties
The Add-In detects the localizable texts in the controls on your Forms, UserControls and UserDocuments based on information in a controls database. This database indicates exactly which properties require translation. It can easily be extended to handle additional controls which you use in your projects.
Detect strings in your source code
The Add-In scans the source code and detects all strings.
Select texts for localization
Not all texts in a project require translation. In fact, Visual Basic program often contain a lot of text strings which must not be translated. With the Multi-Language Add-In, the programmer can select exactly those texts which require translation.
Hide lines which do not require translation
Strings in the source code which do not require translation can be hidden, by adding the comment 'MLHIDE to the end of the line. This can be added via the Add-In, or using the code editor.
It is good practice either to select or to hide each individual string in your project. This makes it easy to locate new strings which are added to the source code at some later stage.
Filter using regular expressions
A significant job for the programmer (and not the translator) is to identify exactly which texts in the source code require translation. Often you can use simple rules to select texts, or alternatively to hide them.
Using this feature, you can specify a regular expression, which is used to match either:
- a text string or
- the complete code line containing a text string.
By matching the complete code line, you can easily detect where strings are used in specific function calls, or for example, in a select case statement.
Excel export and import
If you are not able to translate the texts yourself, you will have to pass them on to a translator. The easiest way to do this is to export the texts to an Excel file, let the translator enter translations using Excel and then import the translations back into the Add-Ins's project database.
The Add-In supports two different Excel formats:
- a simple format using a single worksheet and no macros
- a three worksheet format which provides more context information and uses Excel macros to ensure consistency between the worksheets and to provide additional features
Global translations database and translation memory
Aside from the individual project databases, the Add-In stores all translations in a global translations database, where they are indexed according to the words contained in the texts.
When the Add-In detects an exact match with a string in the global database, then it will use the stored translation automatically. This is well suited to handling common terms such as OK and Cancel.
When you edit a translation, you can use the translation memory feature to view previous translations of texts containing one or more of the same words. If you are able to translate the texts yourself, then this is a great help. In particular, it helps you to use technical terms in a consistent manner.
Generation of single or multiple language versions
- Generate multiple versions of your application, each for a single language or
- Generate a single version supporting multiple languages
Language switching
Add support to your project to switch the language of the user interface when the program is running.
Read resource strings in different languages
The VB function LoadResString only reads resource strings in the current system language. The Add-In provides an alternative function, to read resource strings in a specified language.
Switch language in separately compiled components
The Add-In uses an event mechanism to indicate that the language has been changed. Even if your application is made up of separately compiled modules (.exe, .ocx or .dll), the event will still be received by all active components (Forms, UserControls or UserDocuments).
The events are generated via the module MLRuntime.dll, which you can distribute freely with your application.
Language selection form
The Add-In provides a simple form to select the language in your application. The Add-In can add this form to your project and generate code to show the form the application starts.
Preview mode
Switch the language used in the form designer window, to preview your Forms, UserControls and UserDocuments in a given language.
Import projects which already use resources
The Add-In detects existing calls to the VB function LoadResString and imports the associated resource strings.
Support for far eastern languages
The Add-In provides full support for far eastern languages. The grid editor works with an Input Method Editor (IME).
Font switching
The Add-In provides support for switching the font used in controls when the language is switched.
Search function
The Add-In contains a flexible search function to find texts in the original language and in the translations.
Exclude modules from translation
Modules which contain no localizable texts can be excluded from the source code scan.