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

Multi-Language Add-In for Visual Studio


Add meta:resourcekey in Upgrade from 4 to > 4.5

Hello Phil,

We have a long running project/application (started in asp.net 1.1, now in asp.net 4.0) that first was localized with a pre 4.0 version of the Multi-Language Add-In.
Since then we have the ml_UpdateControls() function on each page, that sets the localized values for each control.

The new controls that have been added since the release of 4.5 are handled using the post 4.5 pattern, by adding met:resourcekey.

We would like to move all controls to the new pattern.

So I'm looking for an automated way to set the meta:resourcekey for all the old controls (we have lots). I have only found that deselecting/reselecting the texts in the Multi-Lang grid will add the meta:resourcekey attribute, but doing this for the full project is not an option.

Is there a way to do this automatically?

best regards
Andreas

Germany

Hi Andreas,

if necessary, I can add a function to the Add-In (for example in the tools menu) to do this upgrade. This ought to be quite easy within the Add-In.

In fact, I was about to start doing it, but I have decided it is too late to start doing it today.

I have two other suggestions which might help (but I doubt it):

(1)
In the Add-In, you can select multiple items (by holding the shift key). You can also use the space bar to select and deselect them.
This might make it much quicker to deselect and then reselect a large number it items.

(2)
There is a Visual Studio command in the Tools menu: "Generate Local Resource".
(In older versions of visual studio, it is only enabled when the design view is open. With VS 2012 I think it is also available when the ASP/HTML source is visible.)
This command basically inserts the meta:resource key tags, but only for the current page. I don't think Visual Studio has any way to insert them globally.
After that you would have to rescan the project with the Add-In.

As I say, I am not confident that these tips will help. I will try to add a function in the next day or two.

Phil

Germany

Hi Andreas,

I had a burst of energy and added a function immediately. It is in version 5.0x.0054, at the bottom of the tools menu.

Phil

Hi Phil,

That worked like a charm. Exactly what I needed. Thanks a lot!

/andreas