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

Multi-Language Add-In for Visual Studio


Developer Express ASP

I am using ML to localize a web project. For standard asp controls everything is ok. Not so for the components from Developer Express. It seems that the scanner does not recognize these controls at all.

Now, if i use VS2005 to Generate Local Resources the DevEx controls are recognized and the strings are put into resx-files. (A meta:resourcekey is added to each item as well.)

I can translate these strings by hand (just for testing) in the renamed (da) resx-files, but this file will get overwritten by the next ML-addin generation of resources.

A typical aspx-line that need translation will look like this: <dxwgv:GridViewDataTextColumn VisibleIndex="1" FieldName="Address1" Caption="Address" meta:resourcekey="GridViewDataTextColumnResource3"></dxwgv:GridViewDataTextColumn>

Any suggestion on how to tackle this?

Germany

Hi,

Thanks for drawing my attention to this. This is actually a big gap in the functionality of the ASP scanner, which I am sure that other people have noticed, but not reported!

The problem is not too difficult. My ASP scanner has to recognize the Register directive and in particular the tagprefix attribute. After that it has to recognize tags which have the specified prefix.

I have made a quick attempt at fixing this problem, and uploaded a new version, which you can download with the link http://www.jollans.com/SetupMultiLang_4_53_0021.exe. (This is NOT the version which you can download from the download page.)

I have tried it with some of the sample programs from Developer Express and it detects the controls. I'm honestly not sure whether it detects the localizable attributes, because I'm not sure which attributes to look for.

With the sample programs, it seems to add a lot of items to the grid, which have no interesting attributes at all. I will have to suppress these, because it just fills up the grid with junk.

If you can give this version a try, I would be interested in your feedback.

Phil


Hi again,

Thanks for your quick response.

The scanner now detects the controls and adds them to the ASP/HTML grid (as an example with a tag of GridViewDataTextColumn).

In this particular context the attributes to localize would be 'Caption' and 'ToolTip', but the scanner doesn't find these.

Just thinking aloud I could see three ways to proceed:

1. I could provide you with a list of tagprefixes for Developer Express ASP Controls and their likely corresponding attributes for translation. This would not be a complete list as there are plenty of properties that could potentially candidate for translation. (When doing translation by hand - editing the resx-files - I often have to add resource-keys not generated by the Visual Studio Generate Local Resources.)

2. Developers Express may provide you with such a list. I have found them very responsive and customer focused in other situations.

3. The scanner could scan the neutral resx-file and base the translation on content found herein. I would have to Generate Local Resources in VS beforehand, but this would allow me to put more things in the resx-file than found by Visual Studio. (Take this idea for what it's worth. I dont know much of the underlying mechanisms.)

BTW: Just finished localizing the Windows Forms based version of our product. No problems at all. 3.000 strings in two days.

Germany

Hi,

the properties which require localization should have the attribute Locaizable=True. I don't think that you can see this attribute in the Visual Studio object browser, but you can certainly see it by using Lutz Roeder's Reflector for .NET.

The localizable attribute is defined for the relevant properties of the Developer Express ASP controls. The problem was entirely in my code.

I have now fixed the scanner so that it recognizes the localizable properties. This update is now in the current version, which you can download from the Downloads page, or with the link http://www.jollans.com/SetupMultiLang2005.exe.

Phil


Hi again,

The links point to a version 4.53.0019 and not -23. (The changes does not seem to be present in version -19).

/Jens

Germany

Hi Jens,

you are right. Unfortunately, I can't fix it until this evening. Then I will upload the correct version.

Phil

Germany

I have now uploaded the correct version.

Based on the date of the file, it looks as if I uploaded the VB6 version by mistake.

Phil


Right file now - and a big step furtherbiggrin

The scanner now discovers DevExpress components as such. Only problem remaining is that it does not discover collections. As an example it will discover the root level elements in a menu, but not the items below root. Same goes for a navigator, and to some extend for column captions in a grid.

Strange thing though is that the scanner assigns ML-ids in a way that the missing elements are excluded from the number series. I.e. if a menu item has two elements below, the numbering will be 1, 4. If I then manually assigns ResourceKeys using the numbers missing from the series - and do the scan once more - I can do the translation with expected results.

Please let me know if you need more info or code samples.

Br,
Jens

Germany

Hi

I have tried to scan some of the demo pages containing menus and it seemed to discover the menu items correctly.

Can you send me email me a sample asp file (or project) which it does not scan correctly?

Phil




Germany

Hi Jens,

I had a minor problem scanning your file, because I have a slightly different version of DevExpress.Web.v8.1.

Initially I got the error

Could not load file or assembly 'DevExpress.Web.v8.1, Version=8.1.1.0, Culture=neutral,
PublicKeyToken=9b171c9fd64da1d1' or one of its dependencies.
The system cannot find the file specified.

I presume that you do not get this error. I was able to fix it by changing the version to 8.1.4.0.

After that, it scanned fine, and showed the results below:
Image
So far as I can see, it recognizes all of the menu items.

Is it behaving differently for you?

Phil


Hi Phil,

I get the same result. If i translate ML_0001 'Activity Center' into 'Aktivitetscenter' i get the expected result. If i translate ML_0003 (inserted by hand) from 'Calendar' into 'Kalender' i also get the expected result.

Now for the problem:

If i translate line 46 NavbarItem Companies (without an identifier) from 'Companies' into 'Firmaer' nothing gets into the resx-files and it doesnt show in the translated version.

So maybe the scanner does find items in collections, but no identifiers (ML_xxxx) gets attached and as such i cannot translate.

Am I missing a point?

/Jens

Germany

Hi Jens,

I have added Danish to the project. This is how I have entered the translation.

Select the text with the checkbox and enter the translation

Image

Store the texts to resource files

Image

Check the resource

  • Click on the button to show all files in the solution explorer.
  • Expand the node App_LocalResources
  • Locate the file MasterPage.master.da.resk and open it with a double click

Image
Scroll down in the resource file to locate ML_0054.Text.
Image
As you can see in the screenshot, the text Firmaer has been stored as a resource string in the Danish resource file.

I don't know if you are missing a point, maybe I am!

Phil


First of all, I really appreciate the efforts you are putting into this.

Now, in your first screeenshot from 21 of Jun, 200800:48 there is no ML_0054.Text. In these last screenshots ML_0054 appear. How did that happen?
Or to ask another way: In your last examples you translated the term Companies. The term just above this (line 43 My Companies) - how would you translate that? There is no ML_00xx for that one and it is not in the resx-file.

Germany

You have to click on the checkbox in the grid. It then inserts the meta:resourcekey into the aspx source code.

(I see that it doesn't immediately show it in the grid, which is a bit inconsistent, but not really important.)

The resource strings are generated when you use the command "Store resources for Web projects".

Phil


OK.I will do that. Case closed biggrin