asp.net localization does not work?

Hi there,

I'm getting trouble with localization in my asp.net website. I use .NET locationlization structure, with dll resource file for each language, and the website work perfectly in my localhost. However when I upload it into Jodo server, with the correct directory structure for the resource files (in particular the default xxx.dll for English and vi-VN/xxx.dll for Vietnamese) but Vietnamese is never loaded although the current thread culture is set to Vietnamese already. The site just use the fallback dll, English for all the text (except those from DB).

Please anyone can help me!

Nguyen
 
Maybe I?m too late but i had the same problem some day ago and I solve it with the following "work arround".

1. Change in the property tab of the language resources the "Build action" from "Embedded resource" to "none" (so it does not create satellite assemblies)

2. Create the resource files manually with resgen
( resgen <res file> and it creates <res file>.resources)

3. Change code in your app. from
ResManager = new ResourceManager("Myapp.Strings", ...)
to
ResManager = ResourceManager.CreateFileBasedResourceManager("Strings",Server.MapPath("~/"),null);

(you can put the .resource file in a subfolder but remember to reflect changes in the call at Server.MapPath(..)

Compile, try.

Maybe I was lucky, but it works as it should.

I hope my english was good enough to explain my trick.
Have a nice day.

Ciao
 
Back
Top