Usha phulwani
Usha phulwani

Reputation: 184

Resource file is not working properly on IIS

I have 2 resource file.. one is default for english and another one is for chinese. The web app is working fine with VS but when I published it on IIS its not showing chinese language. I tried other solutions available on stackoverflow but nothing seems to work yet. I can find resources.dll inside zh(bin) folder on IIS. Is the error because of there was only one designer file generated that is Resource.designer.cs or something else. I have made the required changes in Resource File properties like making the class public and build action. IN web.config I changed

<globalization enableClientBasedCulture="true" uiCulture="en-US" culture="en-US" />

from false to true. Please ask if Any other information needed to solve this issue. Please give me some advice on this.

Upvotes: 0

Views: 1271

Answers (1)

Usha phulwani
Usha phulwani

Reputation: 184

When I published it in the beginning the App_GlobalResources didnt get copied on server. I was able to see a resource dll for chiese in bin folder on server but it was of no use I think. doing republishing of website on my server after some changes, got me the desired result. here are the things that I changed - I went to properties of resource file and changed -

Build to - Content

Copy to output directory - copy always

custom Tool- PublicGlobalResourceProxyGenerator(made both resource file public)

and then in web.config I changed

<globalization enableClientBasedCulture="false" uiCulture="en-US" culture="en-US" />

to

<globalization enableClientBasedCulture="true" uiCulture="en-US" culture="en-US" />

Then I published it and got the chinese option working.

Upvotes: 0

Related Questions