Loading...
 

History: MultilangVB6QuickTour

Preview of version: 7

Multi-Language Add-In for Visual Studio

Plugin execution pending approval

This plugin was recently added or modified. Until an editor of the site validates the parameters, execution will not be possible.

Plugin execution pending approval

This plugin was recently added or modified. Until an editor of the site validates the parameters, execution will not be possible.

After you have installed the Add-In, there will be a new menu item in the Tools menu in Visual Studio.

Image
This menu item activates the Add-In and shows it in a tool-window. Like other tool windows in Visual Basic, you can dock this window at any side of the main Visual Basic window. It's probably best to place it at the bottom, in a wide format.
Image
You may close the window at any time and reopen it using the Add-Ins menu.

Selecting a project

In Visual Basic, you may work with a project group containing multiple projects. However, the Multi-Language Add-In always works with a single project. To get started, you must first select a project. There are two ways to do this.

from a dialogWhen you select the Add-In from the Add-Ins menu, it will probably show a list of the projects in a dialog.
Simply select the project and click on OK.
Image
This dialog can be disabled, so if somebody else has already worked with the Add-In, it might not appear.
from a drop down listAt the top of the Add-In's main window, just below the toolbar, there is a drop down project list
Image
You can select a different project at any time from this list.

Initialising the project for localization

When you select a project for the first time, you must specify what the original language of the project is. You can select the language from a drop down list containing all of the languages supported by Windows.

It is also possible to specify a non standard language, but this is not recommended.
Image
The Add-In will now add two new files to your project.
<project name>_ml.mdbThis is the project database used by the Add-In. It is added to the project as a related document.
mlstring.vbThis module contains support functions, in particular the function ml_string(), which is used to load localized strings.

Scanning the project

The Add-In will now scan the project. This is performed in two phases:

  • scanning source code
  • scanning controls

In the first phase, the source code of the project is scanned for texts which may require translation. In the second phase, the controls in each Form, UserControl and UserDocument are scanned for properties containing strings.

The results of the scan are displayed in two separate grids in the Add-In's window. You can switch between these grids using the tabs at the bottom of the window.
Image

Adding a second language

To add a new language to the project, click on the Image symbol on the Add-In's toolbar
Image
Image
This brings up a dialog with which you can add a new language to the project.

You can select a language from a drop down list showing all of the languages supported by Windows. Then simply click on OK to add the language to your project.

If you wish, you can initialise the texts in the new language based on the texts for another language, but this is not recommended.
After adding the second language, the Add-In will
  • add a new column to the grids for the new language
  • search for translations of common texts such as OK and Cancel in the Global Translations Database


Now we will take a closer look at the two grids.

The controls grid

To see the controls grid, make sure that the controls tab at the bottom of the window is selected. The grid should look something like the following screenshot.
Image

By default, the properties are shown in a hierarchical manner, showing the association of properties to controls. As an alternative, you can view the properties on each Form, UserControl or UserDocument in a flat list. To select this mode, click on the Image button on the toolbar and then select Flat list from the menu.
Image

The controls grid will then look something like the following screenshot.

Image
To enter a translation, simply click in cell and type in the new text. If you are able to translate the text yourself, this is the easiest way enter translations.

The check boxes to the left of the property name indicates that the text has been selected for translation. By default, all properties which contain a non empty string are selected. In the screenshot above, you can see two menu separators with the text "-". It makes no sense to translate these, so we can remove deselect them by clicking on the check boxes.
Image

By default, properties containing empty strings are not shown in the grid. It very rarely makes sense to translate empty strings, so this if sensible setting. If you do want to see localizable properties containing empty strings, then you can modify this option in the settings dialog. To show this dialog click on the settings button Image on the toolbar. Details of this and other options are described in the online help file.

The source code grid

To see the source code grid, make sure that the source code tab at the bottom of the window is selected. The grid should look something like the following screenshot.
Image
As in the controls grid, you can select a string for translation by clicking in the checkbox to the left of the line number. In contrast to the controls grid however, none of the texts are selected automatically.

When you click on a line in the source code grid, the corresponding line in the source code will be shown in the source editor. Alternativly, if you select a line in the source editor, which contains a string, you can locate this line in the source code grid by clicking on the goto line button Image on the toolbar.
Image
Alternativly, you can select Show in Multi-Language from the context menu in the source code editor.
Image

When you click on a line in the source code grid, the corresponding line in the source code will be shown in the source editor. Alternativly, if you select a line in the source editor, which contains a string, you can locate this line in the source code grid by clicking on the goto line button Image on the toolbar.
Image
Image
Alternativly, you can select Show in Multi-Language from the context menu in the source code editor.

History

Information Version
Sun 04 of Dec, 2016 17:44 GMT Phil 19
Wed 24 of Dec, 2008 23:16 GMT Phil 18
Thu 24 of Jan, 2008 21:44 GMT admin 17
Mon 21 of Jan, 2008 22:29 GMT admin 16
Sat 12 of Jan, 2008 17:58 GMT admin 15
Sat 12 of Jan, 2008 17:33 GMT admin 14
Sat 12 of Jan, 2008 15:35 GMT admin 13
Sat 12 of Jan, 2008 14:41 GMT admin 12
Sat 12 of Jan, 2008 12:31 GMT admin 11
Sat 12 of Jan, 2008 12:23 GMT admin 10
Sat 12 of Jan, 2008 11:09 GMT admin 9
Fri 11 of Jan, 2008 21:36 GMT admin 8
Fri 11 of Jan, 2008 21:33 GMT admin 7
Thu 10 of Jan, 2008 22:47 GMT admin 6
Thu 10 of Jan, 2008 21:17 GMT admin 5
Thu 10 of Jan, 2008 21:11 GMT admin 4
Thu 10 of Jan, 2008 21:04 GMT admin 3
Thu 10 of Jan, 2008 20:47 GMT admin 2
Thu 10 of Jan, 2008 20:42 GMT admin 1