2

I am having some trouble with mvc3 and a custom resource provider. I created a custom resource provider with a database.

I added the settings in my web.config.

But how can I get localized strings in my views with the resourceprovider ?

I can't find info anywhere.

Can someone please help ?

Nealv
  • 6,856
  • 8
  • 58
  • 89

1 Answers1

1

In ASP.NET MVC 3 I have been using this syntax in view:

@ViewContext.HttpContext.GetGlobalResourceObject("Glossary", "Hello")

Hand in hand together with resource provider model. There I have a factory which returns current source (file, relation database or Entity Framework ORM).

Jason Sturges
  • 15,855
  • 14
  • 59
  • 80
st35ly
  • 1,215
  • 18
  • 24