title: Is there a way to add two resource folders to aspnet core localization?
body: <p>I'm currently developing the SDK for one project and as a requirement I need to add two resources locations. One will be provided with the SDK lib and another to be provided by the consumer app.</p>
  
  <p>Currently, according to docs, this is how to add localization:</p>
  
  <p><code>services.AddLocalization(options =&gt; options.ResourcesPath = "Resources");</code></p>
  
  <p>I'm calling this method from my <code>BaseStartup</code> class that will be inherited by the consumer app's <code>Startup</code> class. So I need to be able to setup the location of the SDK's resources folder and the consumer app's one as well.</p>
  
  <p>Maybe something like:</p>
  
  <pre><code>services.AddLocalization(options =&gt; 
  {
      options.ResourcesPath = "SDKResources";
      options.FromAssembly = sdkResourcesAssembly;
  });
  services.AddLocalization(options =&gt; 
  {
      options.ResourcesPath = "AppResources";
      options.FromAssembly = appResourcesAssembly;
  });
  </code></pre>
  
  <p>Is this possible? If so, how? If not, is there a workaround?</p>
  
  <p>Checking online and even the source code (<a href="https://github.com/aspnet/Localization" rel="nofollow noreferrer">https://github.com/aspnet/Localization</a>) wasn't of much help. The only thing I can think of is using <code>IStringLocalizerFactory</code> which accepts an assembly and the name of the file. Would it work? For instance, adding <code>services.AddLocalization()</code> and then just creating a wrapper class that would provide the consumer app with the strings using the factories created using <code>IStringLocalizerFactory</code>?</p>
  
  <p>Thanks!</p>