Fitzchak Yitzchaki
Fitzchak Yitzchaki

Reputation: 9163

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");.

Upvotes: 2

Views: 569

Answers (1)

Vladimir
Vladimir

Reputation: 46

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.

Upvotes: 3

Related Questions