title: How to handle localization in JavaScript files?
body: <p>I want JavaScript code to be separated from views.<br>
  I got the requirement to implement localization for a simple image button generated by JavaScript:</p>
  
  <pre><code>&lt;img src="..." onclick="..." title="Close" /&gt;
  </code></pre>
  
  <p>What's the best technique to localize the title of it?</p>
  
  <p>PS: I found <a href="http://ayende.com/Blog/archive/2007/10/07/Handling-javascript-localization-in-Mono-Rail.aspx" rel="noreferrer">a solution</a> by Ayende. This is the right direction.</p>
  
  <p>Edit:<br>
  I got Localization helper class which provides the <code>Controller.Resource('foo')</code> extension method.  </p>
  
  <p>I am thinking about to extend it (helper) so it could return all JavaScript resources (from "ClientSideResources" subfolder in <code>App_LocalResources</code>) for the specified controller by its name. Then - call it in <code>BaseController</code>, add it to <code>ViewData</code> and render it in <code>Layout</code>.</p>
  
  <p>Would that be a good idea?</p>