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

Multi-Language Add-In for Visual Studio


Change language at design time

Hi, how I can change a default language of whole project without change the language of single form? Is there another method to see the forms at design time with all different languages?

Regards

Germany

Hi,

the Add-In does not have a feature to switch the language of all forms at design time. You can switch the language of the active form in the drop down list on the Add-Ins toolbar.

For Windows Forms projects, this is implemented by setting the language property. Visual Studio will automatically show the form in the selected language (but if effectively closes and reopens the form).

For ASP pages, the Add-In actually updates the text in the page source, because Visual Studio does not have any built in support for switching the language in a web designer window. (This is also, by the way, how I do in the old VB6 Add-In.)

In both cases, I think it is good practice to switch the forms or ASP pages back to the default language before saving the project. For this purpose, there is a button next to the drop down list on the toolbar, which returns all forms and ASP pages to the default language.

What you want is rather different. You want to modify every form in the project, if possible without even opening the designer window.

If a form already has the property Localizable=True, it would be technically possible to change its language by adding the metadata attribute "$this.Language" to the .resx file (or modifying it if it is already present). This could be done for all forms, without actually having to open the designer windows. (Obviously, if a designer window was already open, it would be better to set the property via the designer window.)

Similarly, it would be possible to overwrite the texts in all .aspx files without opening the designer windows.

I could add this feature, but I really don't know how useful it is!
Why do you want to do it?
Do you think that it is a useful feature for other users?
Is it not enough to switch the language - temporarily - of the current designer?

Phil