Pregunta

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?)

¿Fue útil?

Solución

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'

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top