示例#1
0
        //public static ITranslation UserLanguage(this HttpRequestBase request)
        //{
        //    var langCookie = request.Cookies[LangCookie];
        //    var langId = langCookie == null ? DetectLangIdByHeader(request) : langCookie.Value;
        //    return PhraseList.GetTranslations(langId);

        //}


        //public static void SetThread(ITranslation translation)
        //{
        //    Thread.CurrentThread.CurrentCulture = translation.Culture;
        //    Thread.CurrentThread.CurrentUICulture = translation.Culture;
        //}



        public static string GetDomain(this Controller contr)
        {
            return(UrlUtils.ExtractDomain(contr.Request.Url.AbsoluteUri));
        }