Multi-Language Add-In for VB6 v6.03.0023 » Developer Team :: Best choice for developers!

Multi-Language Add-In for VB6 v6.03.0023

Multi-Language Add-In for VB6 v6.03.0023
Multi-Language Add-In for VB6 v6.03.0023 | 5 Mb

The Multi-Language Add-In for Visual Basic 6 provides a general solution for creating and maintaining Visual-Basic projects with support for multiple languages. The product is an Add-In for Visual Basic 6, which means that it is tightly integrated into development environment.

Specifying the languages to be supported

The Add-In shows you a list of all languages supported by Windows. Simply select a language from the list to add it to the project.

For each language, an additional column is added to the grids, showing the strings for this language.

Using the translations

There are two fundamental ways to use the translations. You can either:

create multiple single-language versions of your program or
create a single multi-language version of your program.
Single language versions

Using the Multi-Language Add-In, it is simple to generate a single language version of your project. You select the language and the Add-In will:

create a complete copy of the project in a new directory
exchange the original texts for the translated texts in the selected language
compile the new project
reload the original project
Creating a multi-language version

There are two aspects to creating a multi-language version of your project:

storing the translated texts as resource strings
adding runtime support for switching the language

To switch the language, the Add-In generates a new function in each Form, UserControl or UserDocument to load the localized texts into the properties of controls in the user interface. A call to this function is added to the Form_Load, UserControl_Initialize or UserDocument_Initialize function.

Language selection and language switching

The Add-In can add a form to your project, which can be used to select the language. This form can be shown:

when the program is started or
at any time when the program is running

The Add-In can add code to your project, to show this form before any other forms are loaded. In this case, the language is selected before any other initialisation code runs.

If you want to change the language at a later stage, then an event mechanism can be used to generate events in all active components, indicating that the language has been changed. The events are generated via a singleton object in the module MLRuntime.dll, which has the great advantage that events can be generated across multiple, separately compiled modules. The Add-In can automatically add the necessary event handlers to support this mechanism. The module MLRuntime.dll can be freely distributed with your application.

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.

Only for V.I.P
Warning! You are not allowed to view this text.

Users of Guests are not allowed to comment this publication.