示例#1
0
        public static string LoadCulture(this IDotvvmRequestContext context)
        {
            var cultureName = (string)context.Parameters[Constants.CultureRouteParameterName];

            if (string.IsNullOrEmpty(cultureName) || cultureName == "xx")
            {
                context.LoadCultureNameCookie();
            }

            context.ChangeCurrentCulture(cultureName);

            return(cultureName);
        }
 public static void ChangeCurrentCulture(this IDotvvmRequestContext context, string cultureName)
 => context.ChangeCurrentCulture(cultureName, cultureName);