Last post Oct 03, 2007 06:40 AM by mywinlive
Oct 03, 2007 06:40 AM|mywinlive|LINK
I have created a custom control in c# class library.
In the custom control I want to show the localized content, for this created .resources files and also satellite assemblies (with resgen and al.exe). I have placed my custom control dll to GAC to be used by an aspx page in sharepoint. In Custom control code
I am setting the UICulture of the thread to browser language.
In my application bin folder created "en-US" folder and placed English locale staellite dll,created "de-DE" folder and placed German locale staellite dll. And placed neutral culture satellite assembly in the bin folder directly.When
I have tseted my application by changing the browser settings it is working fine for this 2 cultures.
But if I choose the culture other than "en-US", "de-DE" I am getting an error.
How to make that my application works with the neutral culture if the resources for the specific culture does not exist.
I have created 3 resource dlls(satellite assemblies) for project named Test (Test.dll (for Neutral Culture), Test.resources.dll (for en-US and de-DE cultures)). Corresponding resource files are Test.strings.resources, Test.strings.en-US.resources and Test.strings.de-DE.resources.
Here is the code I am using to load the resources:
ResourceManager rm = new ResourceManager("Test.strings", System.Reflection.Assembly.Load("Test"));
strings is the root name for my resource files.
How to create the satellite assembly for the neutral culture and make it work if there is no culture specific dll exist for the browser language?
Any help is appreciated.