HostingEnvironment.SetCultures Method (String)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Sets the current thread to the culture of the specified virtual path.

Namespace:   System.Web.Hosting
Assembly:  System.Web (in System.Web.dll)

public static IDisposable SetCultures(
	string virtualPath


Type: System.String

The path that contains the culture information.

Return Value

Type: System.IDisposable

An IDisposable object that represents the culture prior to changing; this object can be used to revert to the previous culture.

The SetCultures method sets the current thread to the culture that results after applying all elements in the configuration files affecting the specified virtual path.

.NET Framework
Available since 2.0
Return to top