ASP.NET MVC localization: Get a resource instance
I'm trying to implement this feature.
I created a resource and set it access modifier
to public
, also Custom Tool
property value to PublicResXFileCodeGenerator
.
I'm trying to get 开发者_高级运维an instance of this resource but I can't, either with strongly type the resource name nor with Type.GetType("WebProject.Resources.Home.ViewModels.ResourceName1");
.
I don't like the way MVC is doing localization so I made it my way. You can check my tutorial here: http://kosev.blogspot.com/2010/06/tutorial-create-aspnet-mvc-localization.html
I'm using simple XML language files, then I have Translator class with caching + html helpers for easy translation in html views. Hope this helps.
精彩评论