This plugin was recently added or modified. Until an editor of the site validates the parameters, execution will not be possible.
This plugin was recently added or modified. Until an editor of the site validates the parameters, execution will not be possible.
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.
You may close the window at any time and reopen it using the Add-Ins menu.
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 dialog | When 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.
This dialog can be disabled, so if somebody else has already worked with the Add-In, it might not appear. |
| from a drop down list | At the top of the Add-In's main window, just below the toolbar, there is a drop down project list
You can select a different project at any time from this list. |
|
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. |
|
| <project name>_ml.mdb | This is the project database used by the Add-In. It is added to the project as a related document. |
| mlstring.vb | This module contains support functions, in particular the function ml_string(), which is used to load localized strings. |
The Add-In will now scan the project. This is performed in two phases:
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.
To add a new language to the project, click on the
symbol on the Add-In's toolbar |
|
|
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. |
Now we will take a closer look at the two grids.
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.
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
button on the toolbar and then select Flat list from the menu. |
|
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.
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
on the toolbar. Details of this and other options are described in the online help file.
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.
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
on the toolbar.
Alternativly, you can select Show in Multi-Language from the context menu in the source code editor.
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
on the toolbar. |
|
|
Alternativly, you can select Show in Multi-Language from the context menu in the source code editor. |