joker77 Posted April 3, 2007 Posted April 3, 2007 I'm using the following lines of code in my project to change the UI languager: 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? Quote What if the Hokey-Pokey IS what it's all about?
Administrators PlausiblyDamp Posted April 3, 2007 Administrators Posted April 3, 2007 Are you compiling your resources into a DLL or just attempting to load the .resx file at runtime? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
joker77 Posted April 3, 2007 Author Posted April 3, 2007 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 Quote What if the Hokey-Pokey IS what it's all about?
joker77 Posted April 3, 2007 Author Posted April 3, 2007 I started again, this time not renaming the namespace class definition, but instead including it in the line: System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LanguageResources.LanguageResource)); I then rebuilt and it worked fine. Quote What if the Hokey-Pokey IS what it's all about?
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.