IUpdateServerConfiguration.SupportedUpdateLanguages
Retrieves a collection of languages that WSUS supports.
public StringCollection SupportedUpdateLanguages {get;}
Public ReadOnly Property SupportedUpdateLanguages As StringCollection
Property Value
Collection of language codes that WSUS supports.
Remarks
The language codes follow the format specified in RFC1766. For example, "en" for English or "pt-br" for Portuguese (Brazil). WSUS supports a subset of the language codes that are specified in ISO 639 and culture codes that are specified in ISO 3166.
You can use this collection to ensure the IUpdateServer.PreferredCulture value you specify is valid or to provide a list of localized languages that WSUS supports.
Note that WSUS stores the language codes in lowercase, so if you use StringCollection.Contains to determine if the collection contains a specific language code, you must specify the language code in lowercase (Contains performs a case-sensitive comparison).
The collection contains the "ja-nec" language code. This code is for internal use. Do not try to use it to create a CultureInfo object (the call will fail).
Example Code
The following example shows how to iterate through the list of languages WSUS supports. The server variable that is used in the example is an instance of IUpdateServer (for information on retrieving an IUpdateServer instance, see Using WSUS).
IUpdateServerConfiguration configuration = server.GetConfiguration();
System.Globalization.CultureInfo culture;
foreach (String languageCode in configuration.SupportedUpdateLanguages)
{
if (languageCode.ToLower() != "ja-nec")
{
culture = new System.Globalization.CultureInfo(languageCode);
Console.WriteLine("Language code: {0} ({1})", culture.Name, culture.DisplayName);
}
}
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
IUpdateServer.PreferredCulture
IUpdateServerConfiguration.GetEnabledUpdateLanguages