0
votes

i have a piece of code in my ASP.NET that is depend on the culture/uiCulture that the user is coming from to load few connection string values (right now, we have two, en-US and de-DE resources files).

In my globalization, i set the following two properties: enableClientBasedCulture="true" culture="auto:en-US" uiCulture="auto:en"

which (from what i understand), means that the application will using the client culture, and the default one (in case its not found) should be en-US, meaning, that if a user comes from france, hence, culture should be fr-FR), and i don't have a resource file that is dedicated to it, it would load the en-US.

resourceManager = new ResourceManager("MyDLL.Properties.Resources", Assembly.GetCallingAssembly());

what i get is: "Could not find any resources appropriate for the specified culture or the neutral culture".

Can anyone explain me what do i do wrong?

Thanks.

2
found the problem, i was trying to load it from the wrong assembly.Or A

2 Answers

1
votes

Depending on where you are calling your code, the culture might not be set yet. When you are calling the code you mentioned, what are the values of the following?

Thread.CurrentThread.CurrentCulture
Thread.CurrentThread.CurrentUICulture
0
votes

found the problem, i was trying to load it from the wrong assembly.