user156888
user156888

Reputation:

Asp.Net Mvc localization with embeded resx files

Hi we are making a site in Asp.Net Mvc which is localized with embeded resx files.

On the nightly server we have the site showing in english but switching to german does not work where as locally it does.

Decompiling the dll we deployed I can see the resources are there but only in english?

should I be deploying the resx (even though they are set to Public and so have the generator ran against them) files along with the dlls?

w://

Upvotes: 0

Views: 1395

Answers (1)

Darin Dimitrov
Darin Dimitrov

Reputation: 1038800

should I be deploying the resx

This will depend on where are those resources defined. If you use the ASP.NET App_GlobalResources folder, then you should deploy the 2 resx files: Resources.resx and Resources.de-DE.resx along with your application.

If you put resources in a separate class library or in a some custom folder in yuor ASP.NET MVC application like Resources/Strings.resx and Resources/Strings.de-DE.resx then you should deploy the generated satellite assembly in bin\de-DE\MyClassLibrary.resources.dll which will contain the de-DE resource strings whereas your bin\MyClassLibrary.dll will contain the default language strings.

Upvotes: 1

Related Questions