Yes, the base resources are compiled into the assembly. All language
resource files end up in satellite assemblies. If you're using VS, this will
be done automatically as long as you observe the proper naming conventions.
For example, let's assume you created a resource file AppResources.resx in
your project and your namespace is MyNamespace.MyApp.
In this case, the ctor for your ResourceManager should look like this:
ResourceManager rm = new ResourceManager("MyNamespace.MyApp.AppResources",
Assembly.GetExecutingAssembly());
Note the fully qualified resource name!
AppResources.resx is compiled to AppResources.resources (you can do this
manually using resgen) and embedded in your core assembly (MyApp.exe). You
can create localized resource files like this:
AppResources.fr-FR.resx // French (France) resources
AppResources.de-DE.resx // German (Germany) resources
AppResources.ja-JP.resx // Japanese (Japan) resources
These resources will also be compiled to their appropriate resources files
and embedded in satellite assemblies named MyApp.resources.dll. These
assemblies will end up in directories named after the culture (fr-FR, de-DE,
ja-JP) underneath your main application directory. At run-time, the resource
manager will attempt to find appropriate resources for the selected
CurrentUICulture. There is a fallback mechanism if no resources can be
found, and as a last resort the resources embedded in the main assembly will
be used (i.e. the resources in the base resource file AppResources.resx).
I hope this helps.
--
Kai Brinkmann [MSFT]
Please do not send e-mail directly to this alias. This alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.
"Phil Da Lick!" <ph***********@NOSPAMhotmail.com> wrote in message
news:uj**************@TK2MSFTNGP14.phx.gbl...
Kai Brinkmann [MSFT] wrote: You need to use the fully qualified name of the resource file in the
ResourceManager constructor.
what resource file? does it not work the same way as VC++ where the
resources are compiled into the assembly? I've just added the resources in
a resx to the assembly in the prroject view.