title: C# / Razor - Access localized string resources from a RazorEngine template
body: <p>I'm building dynamic HTML emails by using RazorEngine to populate a CSHTML template. I need to send emails in multiple languages, and I'd like to use localized string resources within my template to switch languages, like so:</p>
  
  <pre><code>@Resources.EmailTemplate.OrderNumberLabel
  </code></pre>
  
  <p>How can I specify the culture used by RazorEngine? It always appears to use the default culture when pulling in strings. I've tried setting the thread culture before parsing with no luck:</p>
  
  <pre><code>System.Threading.Thread.CurrentThread.CurrentCulture System.Globalization.CultureInfo.CreateSpecificCulture(culture);
  </code></pre>
  
  <p><em>Note:</em> I've seen other implementations that have used a different CSHTML file for each language, but I'd like to keep the localized content and the markup separated.</p>