Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Some Resources loaded in view are not localized, why?

I am creating an ASP.NET MVC 4 Application and use the default .net resources for localization.
Now I have the strange behaviour as following, BUT only on my live server, not on my development machine:
enter image description here

The Red and Green ones are loaded via @Namespace.Properties.Resources.Key directly in the view and the yellow ones via [Display[...] attributes in the model and @Html.DisplayFor(...).

Does anyone have an idea why on the live server some of them are loaded wrong?
The correct/actual resource file is loaded, as the localized display attributes where added before the last upload and they are loaded correctly

like image 955
Christoph Fink Avatar asked Mar 11 '13 20:03

Christoph Fink


Video Answer


1 Answers

I found the problem:
I had miss-configured one of my plugins in the past, to include the resources of the base project to its output and so this "old" resource file was still laying on the server from an old publish in the resource folder of the plugin, which gets copied to the base resource folder when the plugin is loaded --> the "newly uploaded" original base resource file was overwritten by the old one from the plugin folder.
I just needed to delete that one file from the server and now it seems to work.

About my statement "The correct/actual resource file is loaded, as the localized display attributes where added before the last upload and they are loaded correctly":
The mentioned display attributes are in a different resource file (I have several), which was not overwrites as never publish by fault with the plugin as the other one.*

like image 77
Christoph Fink Avatar answered Nov 14 '22 23:11

Christoph Fink