0

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.

1
  • found the problem, i was trying to load it from the wrong assembly. Commented Jun 29, 2011 at 5:16

2 Answers 2

1

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
Sign up to request clarification or add additional context in comments.

Comments

0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.