GlobalizationSection.EnableClientBasedCulture Property

Gets or sets a value indicating whether the Culture and UICulture properties should be based on the AcceptLanguage header field value that is sent by the client browser.

Namespace: System.Web.Configuration
Assembly: System.Web (in system.web.dll)

public bool EnableClientBasedCulture { get; set; }
/** @property */
public boolean get_EnableClientBasedCulture ()

/** @property */
public void set_EnableClientBasedCulture (boolean value)

public function get EnableClientBasedCulture () : boolean

public function set EnableClientBasedCulture (value : boolean)

Not applicable.

Property Value

true if the Culture and UICulture should be based on the AcceptLanguage header field value sent by the client browser; otherwise, false. The default is false.

When the EnableClientBasedCulture property is enabled, the Culture and UICulture properties are based on the AcceptLanguage header field value that is sent by the client browser. If the AcceptLanguage header value cannot be mapped to a specific culture, the Culture and UICulture values are used. The default value is false.

The following code example demonstrates how to use the EnableClientBasedCulture property. This code example is part of a larger example provided for the GlobalizationSection class.

// Display EnableClientBasedCulture property.
Console.WriteLine("EnableClientBasedCulture: {0}", 
  configSection.EnableClientBasedCulture);

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show: