I’m using MVC2.
I created a .resx file in a folder I created:
/Resources/
/Resources/en-US.resx
In the properties I set it to use the custom tool: PublicResXFileCodeGenerator.
I compiled the project.
Now in my view page, how do I reference a resource?
When you did this, Visual Studio generated a strongly typed class for it so that you can access the resources. So simply bring the namespace into scope:
and then:
This assumes that you have a
~/Somenamespace/Resources.resxand~/Somenamespace/Resources.en-US.resxfiles and so on: