Multi-Language Add-In for Visual Studio
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.
The Multi-Language Add-In is designed to help you add localization support to your project at any stage during its development, or after completion of the development.
Detect properties with the Localizable attribute
In the .NET type system, properties of controls which require translation are assigned the Localizable attribute. The Add-In identifies all properties with the Localizable attribute and shows them in the grid editor.
Detect text strings in the source code
The Add-In scans the source code of each component and shows all text strings in the grid editor. You can select the texts which actually require translation with a simple check box next to each text.
Detect text strings in resource script (.rc) files (for C++/MFC)
For unmanaged C++ projects, the Add-In identifies texts defined in dialog and menu resources in the resource script (.rc) file.
Hide lines in the source code
Lines in the source code, which contain strings which do not require translation, can be hidden by adding the comment 'MLHIDE or //MLHIDE to the end of the line. This can be added simply by clicking on an icon at the start of each line in the grid.
Hide properties of controls
Initially, the Add-In shows all string properties which have the Localizable attribute. In practice, this may mean that a lot of properties are shown, which you are not using in your project. In this case, you can hide these properties.
Spreadsheet import and export
Often you will have to send your texts to a translator. Using the Add-In you can export the texts which require translation to a spreadsheet for Excel or for OpenOffice in a format suitable for translation. After translation you can import the translated texts back into the Visual Studio project.
Add comments to texts
You can add comments to each text. If you export the texts to an Excel or Open-Office spreadsheet, then the comment is exported with the text and provides additional information for the translator.
Translations are stored in a project database
The Add-In stores all translations in a project database file, which is either an XML file or an Access 2000 database. The XML format is the default for new projects.
Language-Selection dialog (for Windows Forms)
The Add-In can add a Language-Selection form to your project and show this form when the application starts. This gives the user (or tester) the chance to select the language used in the application.
The form is copied from a template file, which you can edit to suit your requirements.
Language-Selection list (for ASP.NET)
The Add-In can add a Language-Selection control to your project. If you place this control on an ASP.NET page, then it will provide a drop down list to select the language used for the ASP session.
Runtime Language Switching
The Add-In can add support for changing the language of the User Interface at any time when your application is running.
Translation of texts using a simple grid editor
If you are able to translate the project yourself, then it couldn't be easier. After scanning your project, the texts in your project are presented in two simple grid editors - for the properties of controls and for strings in the source code - with columns for each language.
You can edit all texts directly in the grid.
Automatic translation with the Microsoft Translator
The Add-In supports automatic online translation using the Microsoft Translator.
This provides a quick way to translate your complete project for demonstration purposes. However, the quality of the translations is not good enough for a commercial product.
This feature requires an internet connection. In some company networks there may be restrictions on accessing web services.
Support for far eastern languages
The .NET runtime environment provides full support for far eastern languages.
The grid editor in the Add-In supports the use of an Input Method Editor (IME) for far eastern languages.
Switching languages in the designer window
The Add-In allows you to switch quickly between languages in designer windows (for Forms or UserControls) using a drop down list of languages which are used in your project.
This allows you to see exactly what a Form or UserControl will look like in each language. If necessary, you can adjust the size of controls or of a form for a specific language.
View the source code line when editing in the grid
As soon as you start editing the text of string from the source code, the Add-In opens the component in a text editor window and shows the associated line in the file.
If you select a string in a text editor window, you can locate the string in the Add-In's grid editor using a button on the Add-In's toolbar, or via the editor's context menu.
Define common translations once only
Some strings, such as OK and Cancel, are used repeatedly in a project.
The Multi-Language Add-In starts by assuming that identical strings will be translated in the same way at all places in your project. This means that you only need to translate these terms once.
When you edit the translation of a string which is used at multiple locations, the Add-In gives you the option to apply the translation to all occurrences of the string, or only to the selected instance.
Search function
The Add-In contains a flexible search dialog, to search for text strings used in your project.
Global Translations Database
The Global Database is a project-independent database of commonly used translations. After scanning a project for strings, the Add-In automatically searches for translations in the Global Database (this can be disabled in the setup dialog).
The Add-In is installed with a Global Database containing many commonly used terms, such as OK and Cancel, in a number of languages.
By default, SQL Server Compact Edition is used for this database. Older versions use an Access 2000 database. For team work, it is possible to transfer this database to a standard SQL Server, or to use SQL Server Express 2005 or 2008.
Translation memory
When you edit a text in the grid editor, you can access a translation memory dialog. This dialog shows translations from the Global Translations Database, of texts containing one or more of the same words as the current text.
This makes it easy to find how a word or phrase has previously been translated in your projects, and helps you to translate technical terms in a consistent manner.
Filter source code strings using regular expressions
A difficult task, which must be performed by the programmer and not the translator, is to identify which strings in the source code require translation and, just as important, which strings should not be translated.
In many cases, this can be achieved by searching with regular expressions. Using this feature, you can automatically hide, show, select or deselect strings in the source code which match a regular expression.
To make this feature more flexible, the user can choose whether to match the quoted string, or the complete source code line. By searching the complete line of code, you can - for example - easily find strings supplied as parameters to a specific function.
Code Analysis and Code Fix
Select strings for localization of mark them as not requiring localization in the text editor, using a code analysis and code fix, as descried on this page.