I have started working on an MVC project and I came accross some scenarios where I feel I am stuck. I need to convert the exisiting MVC3 site to work for multiple language. As I am new, I may use wrong words/definations/keywords for MVC3 while explaing so please bare with me.
I have one HeaderPage.cshtml and it has a view model binded to it by
@model IHeaderPage
And it ouputs a property of this model:
<h3>@Model.HeaderName</h3>
I called this view from MainPage.cshtml
@Html.Partial("HeaderPage")
Now in the Controller's Action method I change the model's property
objHeaderPage.HeaderName="Fill your Registeration details";
And when i run the project i see the the text "Fill your Registeration details".
Now how can I change the text value, i.e. it should read from my resx file. I have already created resx files in App_LocalResources folder. I heard that, it can be done by Display Attribute.. but how do i do that or is there any other better way?