How to move resources around in a project?

joker77

Freshman
Joined
Sep 16, 2005
Messages
38
Location
Dublin
I'm using the following lines of code in my project to change the UI languager:
Code:
CultureInfo ci = new CultureInfo(""); //invariant culture
ci = new CultureInfo(GetLanguage);
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LanguageResource));

My language resources are in my main project folder, but I've set up a sub-folder called LanguageResources which I'd like to move them into. First off, when I moved them, the class LanguageResource was preceded by a .LanguageResources namespace above the class declaration, I changed that but I'm still having the problem - on the line to instantiate the ComponentResourceManager, it can't seem to find my base LanguageResouce.resx.

How do I tell it to look in a folder for the .resx?
 
I think I'm compiling the resources into a DLL,

In my project folder I have the LanguageResource.resx and .de.resx, .fr.resx etc.
In the bin/debug folder, I've got de and fr folders containing a .resources.dll
 
I started again, this time not renaming the namespace class definition, but instead including it in the line:
Code:
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LanguageResources.LanguageResource));
I then rebuilt and it worked fine.
 
Back
Top