Reputation: 385
I have a resource file named Res.en.resx
in my Asp.Net Mvc 4 project.
In a view I'm trying to access its properties like this: @MvcApp.Resources.Res.Title
but I'm getting the following error:
The type or namespace name 'Resources' does not exist in the namespace 'MvcApp' (are you missing an assembly reference?)
If I change resource name to Res.resx
everything works fine.
Why is this happening?
Upvotes: 0
Views: 1190
Reputation: 100
I believe you need to have at least a file named xxx.resx which contain the translation for the default language of your application.
So if your main language is french and you would like to have an english version, you need:
Hope this help!
Upvotes: 6