I'd like to use resource file (.resx) to do localization in ASP.NET MVC. My thought is:
- Make a default resource file under App_GlobalResources folder Make several local resource files under App_LocalResources folder
- read cookie info to set CultureInFo Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
then, I'd like to use resource file in controller to set ViewData value, something like:
ViewData["Title"] = Resources:Resource, PageTitle;
but the syntax is wrong, how can I do this?
Any idea?