33 lines
1.1 KiB
C#
33 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Threading;
|
|
using System.Web;
|
|
using System.Web.Mvc;
|
|
using Resources.Helper;
|
|
|
|
namespace Weee.Filter
|
|
{
|
|
[Obsolete("This logic is moved into Global.asax.cs's Application_BeginRequest")]
|
|
public class MvcMultilanguageAttribute : ActionFilterAttribute
|
|
{
|
|
/*
|
|
public override void OnActionExecuting(ActionExecutingContext filterContext)
|
|
{
|
|
string cultureName = null;
|
|
|
|
// Attempt to read the culture cookie from Request
|
|
HttpCookie cultureCookie = HttpContext.Current.Request.Cookies["_culture"];
|
|
if (cultureCookie != null)
|
|
cultureName = cultureCookie.Value;
|
|
else
|
|
cultureName = CultureHelper.GetImplementedCulture(cultureName); // This is safe
|
|
|
|
|
|
Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo(cultureName);
|
|
Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture;
|
|
base.OnActionExecuting(filterContext);
|
|
}
|
|
*/
|
|
}
|
|
} |