Question

I created in an external library a custom webcontrol which has it's resources for 2 languages.

I use this assembly in 2 different website with the same web.config element.

<globalization uiCulture="en-US" culture="en-US" fileEncoding="utf-8" requestEncoding="utf-8" responseEncoding="utf-8" />

In website A everything works great, in website B string are displayed with the wrong culture.

I debugged and in both site the thread culture and uiculture are the right one.

The strange fact is that Culture property in the Resource object autocreated by visualstudio is null at runtime in both sites.

It seems that the default culture is different in each sites and when calling:

ResourceManager.GetString("somestring", resourceCulture);

with

resourceCulture==null

The thread gets a different CurrentUICulture

Was it helpful?

Solution

This have a really stupid solution:

Who deployed the assembly did not deployed the folder with the resources.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top