title: Single resource file for DataAnnotations localization
body: <p>What I should try to achieve is to have a single resource (resx) file for each supported language in <strong>net-core</strong>. I explain the problem a bit.</p>
  
  <p>I have DataAnnotations on each of my entities and I need to localize the messages returned in case of errors. It seems that the default convention required by <strong>net-core</strong> is to have a different resx file for each of our entities.  </p>
  
  <p>This file is named accordingly to the namespace of the entity with the culture indentifier and the resx extensions. So, if I have an entity named <em>Customers</em> within the namespace <em>Data.Entities</em>, I should add a file named <em>Data.Entities.Customers.it.resx</em> and put all the translations for the Italian language in it. So, if I have an attribute </p>
  
  <pre><code>StringLength(50, ErrorMessage="The {0} should not be longer than {1} characters") 
  public string Name {get;set;}
  </code></pre>
  
  <p>then I add the proper translation to the <em>Data.Entities.Customers.it.resx</em> file.  </p>
  
  <p>But, if I go on another entitity like <em>Suppliers</em> I am forced to write another resource file named <em>Data.Entities.Suppliers.it.resx</em> and, of course I have </p>
  
  <pre><code>StringLength(50, ErrorMessage="The {0} should not be longer than {1} characters") 
  public string SupplierName {get;set;}
  </code></pre>
  
  <p>Now I need to write again the same translation in the proper file for the Suppliers entity. This goes on as well for other common attributes like [Required].</p>
  
  <p>So I hope to have explained well my problem and my queston is: There is a way to specify a single resource file for all my entities validation messages and then write a single time the messages for the common texts?</p>