Question

I am following the answer below to make globalization happen. Globalization in ASP.Net MVC 3

However, I have failed.

I am getting back a compilation fail error for the following line:

using ViewResources;

I have created Resources folder, created 2 resource file per locale(ViewResources.resx, ViewResources.en.resx), added

<add namespace="ViewResources" />

to web.config in Views folder and it fails like a boss. Compiler Error Message: CS0246: The type or namespace name 'ViewResources' could not be found (are you missing a using directive or an assembly reference?)

Was it helpful?

Solution

You need to specify that the file type as 'embedded resource', to do this select the file in solution explorer, right click-> select properties, change build action to 'embedded resource'

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top