質問

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

役に立ちましたか?

解決

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'

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top