Rediger

Del via


GlobalizationSection.EnableClientBasedCulture Property

Definition

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.

public:
 property bool EnableClientBasedCulture { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("enableClientBasedCulture", DefaultValue=false)]
public bool EnableClientBasedCulture { get; set; }
[<System.Configuration.ConfigurationProperty("enableClientBasedCulture", DefaultValue=false)>]
member this.EnableClientBasedCulture : bool with get, set
Public Property EnableClientBasedCulture As Boolean

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.

Attributes

Examples

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);
' Display EnableClientBasedCulture property.
Console.WriteLine("EnableClientBasedCulture: {0}", _
 configSection.EnableClientBasedCulture)

Remarks

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.

Applies to

See also