Complicated issue with ASP.NET Web Forms Resources and Localization

I have the following non-standard setup (VS2008, .NET 3.5 SP1):

There is a main web project called MainSite and there are several web project "plugins" with different names.

When building these plugins, I have a custom build step that calls aspnet_compiler.exe

and aspnet_merge.exe

. This results in two .DLL files - plugin_name.dll and plugin_name_deploy.dll. The first contains the codebehind classes, the second contains the code generated from .ascx files.

Then these .DLL plugins are copied to the folder /MainSite/bin/Plugins/

. At runtime (application launch), the MainSite application looks in this folder and dynamically loads all DLL files there.

All my forms are in plugins, in .ascx files. The main application is just a skeleton that loads these .ascx usercontrols as needed.

And now there is a need for localization. Ideally, I would like to have the following:

  • When creating resources in Visual Studio, there should be a separate resource file for each form (.ascx file) so that people can localize forms in parallel.
  • A good meta:resourcekey

    technique in .ascx files is very handy for localizing controls;
  • The automatic resource / culture backup mechanism in .NET should be helpful;
  • The compilation result should be such that files from all plugins can be copied to the folder /MainSite/bin/Plugins/

    . If there is a .DLL file for every language / culture and they have to be placed in some specific subfolders, that's fine as long as the DLLs from different plugins don't have clashing names.

Any ideas on how to achieve this?

+1


a source to share


1 answer


Apparently, specialized resource providers can be implemented in .NET. Here is an article containing links to other articles that explain the whole process. In fact, you take the value from meta:resourcekey

and get the value from wherever you want. The article above, for example, stores all localization information in the database.



+1


a source







All Articles