Windows Dev Center

IUpdateServer.PreferredCulture Property

Gets or sets the culture code that you want the WSUS server to use when returning strings.


Namespace: Microsoft.UpdateServices.Administration
Assembly: Microsoft.UpdateServices.Administration (in Microsoft.UpdateServices.Administration.dll)

string PreferredCulture { get; set; }
/** @property */
String get_PreferredCulture ()

/** @property */
void set_PreferredCulture (String value)

function get PreferredCulture () : String

function set PreferredCulture (value : String)

Property Value

The culture code that you want the WSUS server to use when returning strings, for example, "en" for English or "pt-br" for Portuguese (Brazil). This is generally the same as the current UI culture. If you do not set this property, WSUS uses English ("en") as the preferred culture when returning strings. Note also that inner exceptions will be returned not in the language specified by PreferredCulture but in the language specified by CurrentUICulture.

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

Exception typeCondition
ArgumentOutOfRangeException

WSUS does not support the given culture code. For a list of valid values, see SupportedUpdateLanguages.

ArgumentNullException

You cannot specify a null value.

This value should be set to the current UI culture for the caller. Some strings may be returned in the UI culture for the calling thread. You should set this property before calling any of the IUpdateServer methods. The culture code is not persisted; you must set the language code each time you get a new IUpdateServer instance. The culture 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 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.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Target Platforms

Windows Server 2008, Windows Server 2003, Windows Server 2008 R2
Show:
© 2015 Microsoft