I'm trying to get localized error messages for Swedish for Asp.Net Identity by using advice from this post: How to localize ASP.NET Identity UserName and Password error messages?
Using NuGet I downloaded the German language pack and then opened packagesMicrosoft.AspNet.Identity.Core.2.0.0lib
et45deMicrosoft.AspNet.Identity.Core.resources.dll in dotPeek and then exported this to a new VS project:
https://github.com/nielsbosma/AspNet.Identity.Resources.Swedish/
I've copied the generated Microsoft.AspNet.Identity.Core.resources.dll to a new folder under packagesMicrosoft.AspNet.Identity.Core.2.0.0lib
et45se.
When I run my site locally I see that Microsoft.AspNet.Identity.Core.resources.dll has been copied to MySiteinsv
But I can't get it to work :(
If I set in my Web.config:
<system.web>
...
<globalization culture="sv-SE" uiCulture="sv" />
</system.web>
I still get english default error messages. But if I change to german that I've included from NuGet I get german error messages.
Using dotPeek I've compared my dll with the german and they are the same except my has PublicKeyToken=null and the one for german is "31bf3856ad364e35". Could this be why I can't get my dll to load? Is there anyway to set a PublicKeyToken for a dll? Any workaround?
Thanks for any pointers.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…