IUpdateServer.PreferredCulture

Retrieves or sets the language code that you want the WSUS server to use when returning strings.

public String PreferredCulture {get; set;}
Public Property PreferredCulture As String

Property Value

Language code that you want the WSUS server to use when returning strings. For example, "en" for English or "pt-br" for Portuguese (Brazil). If you do not set this property, WSUS uses English ("en") as the preferred culture when returning strings.

Exceptions

Exception type Condition
System.ArgumentOutOfRangeException WSUS does not support the given language code. For a list of valid values, see IUpdateServerConfiguration.SupportedUpdateLanguages.
System.ArgumentNullException You cannot specify a null value.

Remarks

You should set this property before calling any of the IUpdateServer methods. The language code is not persisted; you must set the language code each time you retrieve a new IUpdateServer instance. The language code applies to all other objects that IUpdateServer returns.

This property tells the WSUS server the culture to use when returning strings. The preferred culture string follows the format that is specified in RFC1766. WSUS supports a subset of the language and culture codes that are specified in ISO 639 and ISO 3166, respectively. To determine if WSUS supports a preferred culture value, call IUpdateServerConfiguration.SupportedUpdateLanguages.

Strings that come from user input are not localized. All other strings should be localized. For example, the metadata for updates is localized. When you specify a preferred culture, if an update has localized metadata in that language, the WSUS server returns the information in the specified language. If not, the server returns the strings in English.

This property stores the value in lowercase. If you set the property to pt-BR, WSUS returns the property value as pt-br.

Example Code

For an example that sets the preferred culture, see Using WSUS.

Requirements

Server Requires Windows Server 2003 or Windows 2000 Server SP4 and later.
Namespace

Defined in Microsoft.UpdateServices.Administration.

Assembly

Requires Microsoft.UpdateServices.Administration (in Microsoft.UpdateServices.Administration.dll).

.NET Framework

Requires .NET Framework 1.1.

See Also

IUpdateServerConfiguration.SupportedUpdateLanguages