+2006-12-22 Marek Habersack <grendello@gmail.com>
+
+ * HostingEnvironment.cs: implemented the SetCultures methods.
+
2006-12-19 Igor Zelmanovich <igorz@mainsoft.com>
* ServletWorkerRequest.cs: fixed:
#if NET_2_0
using System;
+using System.Globalization;
using System.Security.Permissions;
using System.Threading;
+using System.Web.Configuration;
using System.Web.Caching;
using System.Web.Util;
vpath_provider = virtualPathProvider;
}
- [MonoTODO ("Not implemented")]
public static IDisposable SetCultures (string virtualPath)
{
- throw new NotImplementedException ();
+ GlobalizationSection gs = WebConfigurationManager.GetSection ("system.web/globalization", virtualPath) as GlobalizationSection;
+ IDisposable ret = Thread.CurrentThread.CurrentCulture as IDisposable;
+ string culture = gs.Culture;
+ if (String.IsNullOrEmpty (culture))
+ return ret;
+ Thread.CurrentThread.CurrentCulture = new CultureInfo (culture);
+ return ret;
}
- [MonoTODO ("Not implemented")]
public static IDisposable SetCultures ()
{
- throw new NotImplementedException ();
+ return SetCultures ("~/");
}
public static void UnregisterObject (IRegisteredObject obj)