all groups > dotnet internationalization > january 2006 >
You're in the

dotnet internationalization

group:

App doesn't load satellite assemblies



App doesn't load satellite assemblies Mike Leftwich
1/30/2006 4:04:27 PM
dotnet internationalization: I gave up on using text files in VS2005 for now and switched to resx files
instead. I entered my strings into the default Resources.resx file, then
copied that file to create Resources.es-ES.resx (Spanish) and
Resources.fr-FR.resx (French) and added them to my project. VS creates the
subdirectories es-ES and fr-FR in the bin directory at build time, and
populates each of them with a <projectname>.resources.dll file. I looked
into each DLL with a hex editor and I can see that strings for all three
languages appear in each DLL (which was a bit surprising).

The problem is that at runtime the executable doesn't load the satellite
assemblies. The only resource set available is the fallback resource
embedded in the exe.

Is there something special I need to do to enable the application to load
the satellite assemblies? From reading the docs, I was under the impression
that it would do this automatically and dynamically as needed, but it doesn't
seem to be doing that.

Any help is appreciated.

Re: App doesn't load satellite assemblies Michael Höhne
1/31/2006 12:00:00 AM
Hi Mike,

you may try to use culture neutral resource files ("es" and "fr" instead of
"es-ES" and "fr-FR") and see if makes any difference. Unless you plan to
create culture specific files for let's say El Salvador (es-SV) or the
french part of Canada (fr-CA), the culture neutral resource file has the big
advantage to work in all regions with the specified language. If for
instance you set your regional settings to Argentina for testing, your
Spanish resource file will not be loaded, as Argentina has a culture code of
"es-AR" and you do not have a resource file for it. Further you have not
provideed a resource file for the language itself (es), so it will use the
default resources assembly. I'm using this approach and did not face any
problems so far. I'm using English in the default resource and resources-de
for German. My system's region is set to German (Germany), which is "de-DE",
and it always loads the correct information from the resources.de.dll.

--
Michael

http://www.stunnware.com/crm

----------------------------------------------------------

"Mike Leftwich" <MikeLeftwich@discussions.microsoft.com> schrieb im
Newsbeitrag news:4CE55247-C33D-4A4F-9F93-47636BBADDA7@microsoft.com...
[quoted text, click to view]

Re: App doesn't load satellite assemblies Mike Leftwich
2/1/2006 7:54:09 PM
Tried that, but got the same behavior.

Thanks.

Mike

[quoted text, click to view]

RE: App doesn't load satellite assemblies marinm NO[at]SPAM online.microsoft.com
2/2/2006 12:24:28 AM
Hi Mike, You are correct that it should compile each of the languages into
a separate satellite assembly by default. I haven't seen this problem. Do
you have a sample project that displays this behavior? If so, can you
attach it so I can investigate?
Thanks,
Marin Millar [MSFT]
Re: App doesn't load satellite assemblies Patrick Blackman
3/10/2006 9:28:07 PM
There is a very good example here :
http://www.reflectionit.nl/LocalText.aspx





[quoted text, click to view]

AddThis Social Bookmark Button