Embedding localized resources

C

cold80

I'm trying to understand how VS 2005 and the .NET Framework 2.0 can be
used for a localized application. I've read a lot of messages, posts
and guides but I can find a straight answer. I would like to write a
DLL library, but I think it'll contain also some forms. I'd like to add
a global resx file for all the error messages and a resource file for
each form. This can be done very easily with VS2005. Then I can add a
resource file for each language with the naming convention and
everythink works very well. My problem is that I don't want satellite
assemblies!!! My DLL should be delivered alone and it would be a
problem for me to package it with all the directories and satellite
assemblies. I tried to embed all the resources with the right names in
the main assembly (for example of a EXE project) using the command line
tools. The problem is that the ResourceManager try to find the
localized resources outside the main assembly and, as it can't find
them, the neutral language is always used. Is there a "solution" to
this problem? May I change the probing mechanism of the ResourceManager
object? Or should I write something on my own?

Thank you for your help

Cold
 
J

Jay B. Harlow [MVP - Outlook]

Cold,
I don't know if you can modify the way ResourceManager works or not. It is
so ingrained in how VS, the tools, & the framework works, I'm not sure if I
would try.


What you may try is the "trick" a VS 2005 addin uses. It creates a single
CommandBars.resx file, then puts each localized resource in this single
..resx file prefixing the tags with the respective culture.

http://msdn.microsoft.com/msdnmag/issues/06/02/PasteAs/

--
Hope this helps
Jay B. Harlow [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley - http://www.tsbradley.net


| I'm trying to understand how VS 2005 and the .NET Framework 2.0 can be
| used for a localized application. I've read a lot of messages, posts
| and guides but I can find a straight answer. I would like to write a
| DLL library, but I think it'll contain also some forms. I'd like to add
| a global resx file for all the error messages and a resource file for
| each form. This can be done very easily with VS2005. Then I can add a
| resource file for each language with the naming convention and
| everythink works very well. My problem is that I don't want satellite
| assemblies!!! My DLL should be delivered alone and it would be a
| problem for me to package it with all the directories and satellite
| assemblies. I tried to embed all the resources with the right names in
| the main assembly (for example of a EXE project) using the command line
| tools. The problem is that the ResourceManager try to find the
| localized resources outside the main assembly and, as it can't find
| them, the neutral language is always used. Is there a "solution" to
| this problem? May I change the probing mechanism of the ResourceManager
| object? Or should I write something on my own?
|
| Thank you for your help
|
| Cold
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top