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

Multi-Language Add-In for Visual Studio


Compatibility between V5.x and V6.x

Hallo,

We used Multi-Language V5.x tool with visual studio 2010 to support multi-languages for an ASP.NET MVC project. All resource files (.resx) are located on the folder App_GlobalResources. By upgrading to Visual Studio 2013 and Multi-Language V6.x and trying to insert some multi-language texts, ML created another resource files on the top of the project (including Multilang.resx).

Should we make some configuration changes to avoid this unwanted behavior?

Each comment is appreciated.

Thanks in advanced,

Germany

Hi,

there has been a change, but it was in September 2012 with version 5.0x.0044.

Formerly, MultiLang.resx was stored in App_GlobalResources for all Web projects. Starting with 5.0x.0044 Multi-Language makes a distinction between Web-Applications and Wep-Projects. For Web-Sites it is still stored in App_GlobalResources. For Web-Applications it is stored in the root directory.

At the same time, it looks like I created different templates for the "ML string module" for these two project types.

Maybe everything will work correctly if you update the code in this file (MlString.cs or MlString.vb). You should be able to find the template files via the Multi-Language options dialog and then clicking on the browse button next to the filename to see the real path.

Without digging a bit deeper, I'm not really sure why I made this change.

What is your specific problem? Does the project not run correctly?

Phil


Hello Phil,

Thanks for your quick replay. You are right; we used before the version 4.7 (and not version 5.x as mentioned above). Moreover, the application is a “Web Project”.

Anyway, I removed the old resources and MIString.cs file. When I started ML tool and clicked on “Store resources for web project”, a new MIString.cs and new MultiLang.xx.resx files were created on the top of the project folder. However, all another resource files in the folder App_GlobalResources were overwritten (Some items in resource files were removed). These resources are used from our own code.

Is there a way to avoid overwriting this resource files?

Ahmad


Germany

Hello Ahmad,

Multi-Language has three tabs, for Controls/ASP, Source code and Resources. I'm not even sure if it had the third tab for resources in version 4.7, but I have been steadily giving it more importance.

Any additional resource files which you have in the folder App_GlobalResources should show up in the resources tab. You should be able to select strings in this tab, just like in the other two tabs.

If a string is selected in the resources tab, then you can enter translations and it should be written to the (original) neutral-language version and to the language specific version.

If a string is not selected in the resources tab, then it should still be written to the neutral-language resource file, but not to any language specific files.

When Multi-Language writes any resource file, it is careful to preserve any resources which is not handling. This basically includes non string resources, for example images.

Multi-Language should not simply remove any resources which are being used.



You said that some resources were removed.

Were the resources removed from the neutral-language resource file (e.g. MyResources.resx) or from a language specific resource file (e.g. MyResources.es.resx)?

Were they string resources?

Do you know if they showed up in the resources tab?

Phil


Hi Phil,

The resources removed from all language specific resource files (in some resource files only one resource item stay and the rest were removed). All of those resources are strings.

These items are displayed in the resources tab. However, ML could not load all translation strings from language specific resource files. I think that ML could not recognize correctly in some situations the link between items in the neutral-language resource file and those in language specific resource files by using the “Name” field.

Is there an option to avoid scanning/storing resource files? I tried to ignore resource modules, but it did not work.

Germany

There is no option to avoid scanning resource file, but you are correct that it doesn't detect existing translations. I hope that I have fixed this in a new version 6.00.0014, which I have just uploaded.

If Multi-Language does not have a translation for a string from a global resource file, then it will import the string from the existing localized resource file. This might not be perfect, but it was fairly quick to implement and I think it should fix your problem.

Phil