Loading...
 
Multi-Language Add-In for Visual Studio

Multi-Language Add-In for Visual Studio


New feature: Adding comments to text strings

Germany

Starting with version 4.60.0009, you can now add a comment to a text. Adding a comment can provide extra information for a translator, about the context where a string is used.

There is an additional column in the grids, usually to the right of the language columns, as shown below:
Image

In the setup dialog, you can choose to place the comment column to the left of the language columns, or to hide the column completely, but I think showing it at the right will be the normal setting.

Since the comment is intended to help translators, it is included in the spreadsheet export. This includes the Open-Office export, single worksheet Excel export and three worksheet Excel export.

Fundamentally, there is not much difference between the comment column and a language column. It has always been possible to add an extra language and misuse it to add hints for the translator. The main functional difference, is that it won't be exported to any resource files.

There is one conceptual question which is worth explaining. If you use the same string repeatedly in your project, the Add-In will always assign it the same String-ID. The main advantage of this, is that you only need to translate the string once.

Suppose, for example, you have the same string in a label in three forms. If you add a comment to this string, what should the comment be associated with,

  • the string or
  • the place where the string is used?


So long as the same string is used in three forms, the only practical answer is to associate the comment with the string. In this case, the same comment must apply at all three places. In fact, if you are going to add different comments for each form, then you must give the translator the possibility to translate the text differently in each context, which means giving each occurrence a separate String-ID.

With this in mind, the Add-In handles comments exactly as translations. When you edit a comment, the Add-In will check whether the string is used at multiple places. If it is, then it will show a dialog listing these places (although I know that this list is hard to interpret) and give you the option to apply the comment to:

  • all occurrences of the string or
  • only the current occurrence.

If you select only the current occurrence, then a new String-ID is generated. From the point of view of the Add-In, this is now a different text.

Although using the same translation at multiple places in a project seems like a good idea, it may be flawed. The programmer cannot really know whether it will be appropriate to use the same translation at each occurrence, if he doesn't know the language.

The three worksheet Excel export allows a more sophisticated approach. On the one hand, the translator has all translations together (in the third worksheet) but he or she can also see where a text is used (in the first two worksheets). If the translator enters a text into one of the first two worksheets, he or she is given the option (exactly as in the Add-In) to apply the translation at all occurrences, or to create a new String-ID at the specific location. This is a good approach if the translator understands it. Of course, the closer you work with the translator, the better the results will be.

Phil