[Mono-winforms-list] Important ResourceManager notes

Peter Dennis Bartok peter at novonyx.com
Fri Jun 10 17:20:33 EDT 2005


Kornel,

You are correct. I had not noticed that VS.Net does in fact create the 
subdirs with satellite assemblies.

Our (potential) problem then becomes that we need to make sure that our gac 
supports satellite assemblies, and that we can teach our build system to 
produce those (at least for MWF where we have more than one)

Cheers,
  Peter

-----Original Message-----
From: "Kornél Pál" <kornelpal at hotmail.com>
To: <mono-winforms-list at lists.ximian.com>; "Peter Dennis Bartok" 
<peter at novonyx.com>; "Rafael Teixeira" <monoman at gmail.com>
Date: 10 June, 2005 14:37
Subject: Re: [Mono-winforms-list] Important ResourceManager notes


>> From: "Rafael Teixeira"
>> Kornel you are not understanting Peter words.
>> It says Managed.Windows.Forms RUNS in german in MS.NET!!!
>
>Here is several hours later and I was too tired to understand.:)) But now I
>understand what you mean.:)
>
>> From: "Peter Dennis Bartok"
>> I mean that when I compile the Mono System.Windows.Forms.dll sources with
>> VS.Net, linking in the neutral as well as the EN and DE resources into 
>> the
>> assembly (not satellite or whatever, just the regular dll that also
>> contains
>> all the code), and I use the resulting DLL with the winforms/messagebox
>> application, I get localized buttons, so it is obviously reading the
>> non-neutral, localized resources from the main assembly.
>
>You are right that you will be able to use both English and German 
>resources
>when you compile it using Visual Studio .NET but it's because VS.NET is
>smart enough to create satellite assemblies automatically for each culture.
>
>Try the attached project.
>Compile it using VS.NET. You will get the result in bin\... and there will
>be a "hu" directory with the satellite assembly. You can examine the exe
>with ildasm to see that there is only the neutral resuorce, no Hungarian.
>
>Then compile it using build.bat (I included this exe variant in the zip
>precompiled).
>It will create the exe in the directory of sources. There will be no
>satellite assemblies and it will contain the Hungarian resources as well.
>You can examine it using ildasm.
>
>Neutral resource contains a single resource named "CultureName" with the
>value "neutral".
>Hungarian resource contains a single resource named "CultureName" with the
>value "hu".
>
>InternalGetResourceSet falls back to neutral (in fact parent) resources if
>you haven't got the appropriate satellite assembly and GetString falls back
>to neutral (in fact parent) resources if you have the appropriate satellite
>resource but it does not contain the requested string.
>
>You can examine the output of the exe.
>
>Kornél
> 



More information about the Mono-winforms-list mailing list