title: How to use ResourceManager in a "website" mode?
body: <p>I am trying here to do a manual translation for the application I am working with. (There is already a working LocalizationModule but it's working dodgy, so I can't use <code>&lt;asp:Localize /&gt;</code> tags.</p>
  
  <p>Normally with ResourceManager you are supposed to be using it as <code>Namespace.Folder.Resourcename</code> (in an application). Currently I am translating an existing asp.net "website" (not web application so no namespace here....).</p>
  
  <p>The resources are located into a folder name "Locales/resources" which contains "fr-ca.resx" and "en-us.resx".</p>
  
  <p>So I used a code with something like this : </p>
  
  <pre><code>public static string T(string search)
   {
    System.Resources.ResourceManager resMan = new System.Resources.ResourceManager( "Locales", System.Reflection.Assembly.GetExecutingAssembly(), null );
  
    var text = resMan.GetString(search, System.Threading.Thread.CurrentThread.CurrentCulture);
  
    if (text == null)
     return "null";
    else if (text == string.Empty)
     return "empty";
    else
     return text;
   }
  </code></pre>
  
  <p>and inside the page I have something like this <code>&lt;%= Locale.T("T_HOME") %&gt;</code></p>
  
  <p>When I refresh I have this : </p>
  
  <blockquote>
    <p>Could not find any resources
    appropriate for the specified culture
    or the neutral culture.  Make sure
    "Locales.resources" was correctly
    embedded or linked into assembly
    "App_Code.9yopn1f7" at compile time,
    or that all the satellite assemblies
    required are loadable and fully
    signed. Description: An unhandled
    exception occurred during the
    execution of the current web request.
    Please review the stack trace for more
    information about the error and where
    it originated in the code.</p>
    
    <p>Exception Details:
    System.Resources.MissingManifestResourceException:
    Could not find any resources
    appropriate for the specified culture
    or the neutral culture.  Make sure
    "Locales.resources" was correctly
    embedded or linked into assembly
    "App_Code.9yopn1f7" at compile time,
    or that all the satellite assemblies
    required are loadable and fully
    signed.</p>
    
    <p>Source Error:</p>
    
    <p>Line 14:<br>
    System.Resources.ResourceManager
    resMan = new
    System.Resources.ResourceManager(
    "Locales",
    System.Reflection.Assembly.GetExecutingAssembly(),
    null );   Line 15:    Line 16:   var
    text = resMan.GetString(search,
    System.Threading.Thread.CurrentThread.CurrentCulture);
    Line 17:  Line 18:   if (text == null)</p>
    
    <p>Source File:
    c:\inetpub\vhosts\galerieocarre.com\subdomains\dev\httpdocs\App_Code\Locale.cs
    Line: 16</p>
  </blockquote>
  
  <p>I even tried to load the resource with <code>Locales.fr-ca</code> or only <code>fr-ca</code> nothing quite work here.</p>