Caching and accessing configuration data in ASP.NET MVC app.
Posted
by Sosh
on Stack Overflow
See other posts from Stack Overflow
or by Sosh
Published on 2009-10-04T14:17:45Z
Indexed on
2010/04/05
4:03 UTC
Read the original article
Hit count: 342
I'm about to take a look at how to implement internationalisation for an ASP.NET MVC project. I'm looking at how to allow the user to change languages. My initial though is a dropdownlist containing each of the supported langauages. Whoever a few questions have come to mind:
- How to store the list of supported languages? (e.g. just "en", "English"; "fr", "French" etc.) An xml file? .config files?
- If I store this in a file I'll have to cache this (at startup I guess). So, what would be best, load the xml data into a list (somehow) and store this list in the System.Web.Cache? Application State?
- How then to load this data into the view (for display in a dropdown)? Give the view direct access to the cache?
Just want to make sure I'm going in the right direction here...
Thank you.
© Stack Overflow or respective owner