Loading...
 

History: MultilangVsNetQuickTourForms

Preview of version: 10

Multi-Language Add-In for Visual Studio

Quick Tour (Windows Forms)

Activating the Multi-Language Add-In

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. You can dock this window at the side of the main Visual Studio window, or drag it into a tab group, like other tool windows in Visual Studio. It's probably best to place it at the bottom, in a wide format.
Image

Selecting a project

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

from a dialogWhen you select the Add-In from the tools 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. The Add-In will show a list of the languages supported by Windows.
Image
Select the original language and click on OK.
(The buttons below the list change the way the list is displayed. In particular, the button English simply shows the language names in English. It does not select English in the list).

This dialog will probably be followed by second dialog, with options for scanning the project. Just click on OK to accept the default options.
Image

The Add-In will now add two new files to your project.

<project name>_ml.mlbThis is the project database used by the Add-In. It is added to the project with BuildAction=None.
mlstring.vb or
mlstring.cs or
mlstring.h + .cpp
This 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 controls
  • scanning source code

In the first phase, the controls in each Form and each ))UserControl(( are scanned for properties with the localizable attribute. In the second phase, the source code of the project is scanned for texts which may require translation.

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 + symbol on the Add-In's toolbar
Image
This brings up a dialog very similar to one where we selected the original language of the project.
Image
Select a new language and click on OK to add this language to the project.

Some languages, such as German or French, are considered to be neutral languages. The regional variations, such as German(Germany), German(Austria), French(France) or French(Canada) are referred to as specific languages. You should always add the neutral language before adding a related specific language. If you do choose to add a specific language, the Add-In will give you the option of adding both neutral and specific languages or only the neutral language.

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 or ))UserControl(( in a flat list. To select this mode, click on the +- button on the toolbar and then select Flat list from the menu, as shown below:
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.

If a text is shown in light grey, then it is the text which would be retrieved at runtime via the resource fallback mechanism. In general, if a text is not defined for a specific language (e.g. Spanish(Mexico)) then the text for the neutral language (e.g. Spanish) would be used. If this has not been defined, then the original text in the project would be used.

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
In fact, we never really want to see these properties again, so we can go one step further and hide them completely. To do this, we first click on the sun symbol Image

The source code grid




History

Information Version
Thu 13 of May, 2021 21:27 GMT Phil 91
Sat 04 of Jul, 2020 11:56 GMT admin 90
Sun 04 of Dec, 2016 17:20 GMT Phil 89
Mon 06 of Apr, 2015 18:27 GMT Phil 88
Mon 06 of Apr, 2015 18:25 GMT Phil 87
Mon 06 of Apr, 2015 18:20 GMT Phil 86
Mon 06 of Apr, 2015 18:18 GMT Phil 85
Mon 06 of Apr, 2015 18:12 GMT Phil 84
Mon 06 of Apr, 2015 18:10 GMT Phil 83
Mon 06 of Apr, 2015 18:08 GMT Phil 82
Mon 06 of Apr, 2015 18:02 GMT Phil 81
Mon 06 of Apr, 2015 18:01 GMT Phil 80
Mon 06 of Apr, 2015 17:59 GMT Phil 79
Mon 06 of Apr, 2015 17:51 GMT Phil 78
Mon 06 of Apr, 2015 17:49 GMT Phil 77
Mon 06 of Apr, 2015 17:19 GMT Phil 76
Mon 06 of Apr, 2015 17:02 GMT Phil 75
Mon 06 of Apr, 2015 16:59 GMT Phil 74
Mon 06 of Apr, 2015 16:53 GMT Phil 73
Mon 06 of Apr, 2015 16:51 GMT Phil 72
Mon 06 of Apr, 2015 16:37 GMT Phil 71
Mon 06 of Apr, 2015 11:41 GMT Phil 70
Mon 06 of Apr, 2015 11:27 GMT Phil 69
Mon 06 of Apr, 2015 09:52 GMT Phil 68
Mon 06 of Apr, 2015 09:38 GMT Phil 67
Mon 06 of Apr, 2015 07:41 GMT Phil 66
Mon 06 of Apr, 2015 07:16 GMT Phil 65
Sun 05 of Apr, 2015 21:57 GMT Phil 64
Sun 05 of Apr, 2015 21:41 GMT Phil 63
Sun 05 of Apr, 2015 16:48 GMT Phil 62
Sun 05 of Apr, 2015 16:35 GMT Phil 61
Sun 05 of Apr, 2015 16:11 GMT Phil 60
Sun 05 of Apr, 2015 15:53 GMT Phil 59
Sun 05 of Apr, 2015 15:41 GMT Phil 58
Sun 05 of Apr, 2015 10:44 GMT Phil 57
Sun 05 of Apr, 2015 10:41 GMT Phil 56
Sun 05 of Apr, 2015 10:17 GMT Phil 55
Sun 05 of Apr, 2015 10:01 GMT Phil 54
Sun 05 of Apr, 2015 08:07 GMT Phil 53
Sun 05 of Apr, 2015 08:05 GMT Phil 52
Sun 05 of Apr, 2015 07:49 GMT Phil 51
Sun 05 of Apr, 2015 07:42 GMT Phil 50
Sat 04 of Apr, 2015 22:01 GMT Phil 49
Sat 04 of Apr, 2015 21:56 GMT Phil 48
Sat 04 of Apr, 2015 21:54 GMT Phil 47
Sat 24 of Jan, 2015 17:50 GMT Phil 46
Sun 18 of Jan, 2015 06:40 GMT Phil 45
Sun 18 of Jan, 2015 06:39 GMT Phil 44
Wed 19 of Sep, 2012 21:47 GMT Phil 43
Sat 09 of Jan, 2010 15:49 GMT Phil 42
Sat 09 of Jan, 2010 15:47 GMT Phil 41
Sat 09 of Jan, 2010 15:33 GMT Phil 40
Sat 09 of Jan, 2010 15:22 GMT Phil 39
Fri 08 of Jan, 2010 21:00 GMT Phil 38
Sat 17 of Jan, 2009 21:33 GMT Phil 37
Sat 17 of Jan, 2009 16:52 GMT Phil 36
Sat 17 of Jan, 2009 14:08 GMT Phil 35
Fri 22 of Feb, 2008 00:11 GMT Phil 33
Wed 23 of Jan, 2008 23:25 GMT admin 32
Wed 23 of Jan, 2008 23:15 GMT admin 31
Mon 21 of Jan, 2008 22:27 GMT admin 30
Thu 10 of Jan, 2008 22:55 GMT admin 29
Thu 10 of Jan, 2008 22:52 GMT admin 28
Tue 08 of Jan, 2008 22:13 GMT admin 27
Sun 06 of Jan, 2008 14:26 GMT admin 26
Fri 04 of Jan, 2008 22:59 GMT admin 25
Fri 04 of Jan, 2008 18:42 GMT admin 24
Fri 04 of Jan, 2008 18:34 GMT admin 23
Fri 04 of Jan, 2008 18:16 GMT admin 22
Fri 04 of Jan, 2008 18:06 GMT admin 21
Fri 04 of Jan, 2008 00:29 GMT admin 20
Thu 03 of Jan, 2008 23:59 GMT admin 19
Thu 03 of Jan, 2008 22:19 GMT admin 18
Thu 03 of Jan, 2008 19:18 GMT admin 17
Thu 03 of Jan, 2008 12:12 GMT admin 16
Thu 03 of Jan, 2008 11:41 GMT admin 15
Thu 03 of Jan, 2008 11:21 GMT admin 14
Thu 03 of Jan, 2008 11:07 GMT admin 13
Thu 03 of Jan, 2008 10:12 GMT admin 12
Thu 03 of Jan, 2008 00:17 GMT admin 11
Wed 02 of Jan, 2008 23:50 GMT admin 10
Wed 02 of Jan, 2008 23:04 GMT admin 9
Wed 02 of Jan, 2008 21:34 GMT admin 8
Wed 02 of Jan, 2008 16:20 GMT admin 7
Wed 02 of Jan, 2008 16:17 GMT admin 6
Wed 02 of Jan, 2008 16:16 GMT admin 5
Wed 02 of Jan, 2008 15:54 GMT admin 4
Wed 02 of Jan, 2008 15:29 GMT admin 3
Wed 02 of Jan, 2008 15:01 GMT admin 2
Wed 02 of Jan, 2008 14:36 GMT admin 1