title: MVC4 localization. Accessing resx from view
body: <p>In my view I would like to access resource strings from the specific local resource on that file.. Just as you know it from web-forms:</p>
  
  <pre><code>(string)GetLocalResource("Title");
  </code></pre>
  
  <p>Painless and smooth. The framework handles which .resx file to get from the culture info code extension (.en-EN.resx). </p>
  
  <p>Is that possible in MVC4 with Razore view? And how?</p>
  
  <p>Iv'e noticed that i can set the <code>Custom Tool</code> property on the .resx file to <code>PublicResXFileCodeGenerator</code>. That way I can access it from the view. Example:
  I've created 2 resource files for index.cshtml in danish and english. Just as I would in web-forms. Here's what I wish i could write (<code>Custom Tool Name</code> property set to 'ViewResource'):</p>
  
  <pre><code>@ViewResource.Title
  </code></pre>
  
  <p>Bam. If current culture is danish, title will be "Forside", and if english it would be "Home". But instead the only options I am given is choosing a specific file. And from that choose the desired string:</p>
  
  <pre><code>@ViewResource.Index_cshtml_en-EN_resx.Title
  </code></pre>
  
  <p>Thats not dynamic. So I thought I could make an extension class that would replace the en-EN/da-DK somehow. But that really seems like relatively alot of work for something so "simple" and already well and easy intergrated into web-forms. There has to be another way. Surely the mvc team has some smart mechanism for us like everything else :)</p>