Hi,
I have created a Web Project that is set up as follows ($ProjectRoot
is a placeholder for the root directory of the Web Project)
$ProjectRoot/resources/Default.de.resx
$ProjectRoot/resources/Default.resx
$ProjectRoot/Global.asax
$ProjectRoot/Global.asax.cs
$ProjectRoot/test.aspx
$ProjectRoot/test.aspx.cs
In my Global.asax I set the current thread's CurrentCulture and
CurrentUICulture based on the domain of the current request
(within Application_BeginRequest Event Handler). If it is the
..de Domain, I set "de-DE", if it is the .com Domain, I set "en-US".
When I initialize the thread to service the request like this:
CultureInfo cultureInfo = new CultureInfo(culture);
Thread.CurrentThread.CurrentCulture = cultureInfo;
Thread.CurrentThread.CurrentUICulture = cultureInfo;
_rm = new ResourceManager("ISW.resources.Default",
Assembly.GetExecutingAssembly(), null);
Where culture == "de-DE" or "en-US" depending on the domain.
After compilation the /bin directory looks something like this:
/bin/ISW.dll
/bin/ISW.Controls.dll
/bin/de/ISW.resources.dll
/bin/de/ISW.Controls.resources.dll
When I call up by test page, that does nothing
but output the current cultures and a test string
retrieved from the ResourceManager, it works
fine on my development machine.
However when I upload the results to the Web Hoster, and call up
the page, the string will always come back in English
(from the Default.resx) even though the page correctly reports
either "de-DE" or "en-US" as the current culture.
I have already tried moving around my Default.resx and Default.de.resx
files within the project hierarchy. Different ways of initializing
the ResourceManager; to no luck.
Is there anything I am missing or might it have anything to do
with missing access rights on the Web Hoster's side? Should I
be using a different technique for changing my cultures or getting
my resources?
Any help would be highly appreciated.
Thanks
Kai Iske