How to dynamically load and switch the resource file in the web app (ASP.NET) without recompiling ?

Posted by Thomas Wanner on Stack Overflow See other posts from Stack Overflow or by Thomas Wanner
Published on 2009-10-30T11:14:36Z Indexed on 2010/05/09 21:38 UTC
Read the original article Hit count: 177

Filed under:
|

I would like to store the resource files (containing texts for labels etc.) for my web application in the database to be able to edit and create them dynamically later (probably in the UI). My idea was to store the whole resx file in an xml column and simply load it on demand - depending on the language and some other attributes of the current user when he is logging into the application or switching the context. The important thing is that the resources do not only depend on the culture info of the user but also on some context information that can be switched by user without logging off and on again (in our case called "group", not having anything to do with a group of users).

Is it possible somehow to load the contents of the resources from an external source and simply switch them without web application being recompiled by the server ? I know that there are some interfaces on which I could hook up and implement a custom resources provider which reads from the database directly but if it could work somehow with the resx files it would probably make things a lot easier..

© Stack Overflow or respective owner

Related posts about resources

Related posts about ASP.NET