Export (0) Print
Expand All
Expand Minimize

RetrieveInstalledLanguagePacks Message (CrmService)

banner art

[Applies to: Microsoft Dynamics CRM 4.0]

Works for all deployment typesWorks online only

Retrieves the list of language packs installed on the server.

The relevant classes are specified in the following table.

TypeClass
RequestRetrieveInstalledLanguagePacksRequest
ResponseRetrieveInstalledLanguagePacksResponse

Remarks

To use this message, pass an instance of the RetrieveInstalledLanguagePacksRequest class as the request parameter in the Execute method.

For a list of required privileges, see RetrieveInstalledLanguagePacks Privileges.

Example

The following code example shows how to use the RetrieveInstalledLanguagePacks message.

[C#]
// Set up the CRM service.
CrmAuthenticationToken token = new CrmAuthenticationToken();
// You can use enums.cs from the SDK\Helpers folder to get the enumeration for Active Directory authentication.
token.AuthenticationType = 0; 
token.OrganizationName = "AdventureWorksCycle";
 
CrmService service = new CrmService();
service.Url = "http://<servername>:<port>/mscrmservices/2007/crmservice.asmx";
service.CrmAuthenticationTokenValue = token;
service.Credentials = System.Net.CredentialCache.DefaultCredentials;

// Retrieve the Locale IDs from the server.
RetrieveInstalledLanguagePacksRequest request = new RetrieveInstalledLanguagePacksRequest();
RetrieveInstalledLanguagePacksResponse response = (RetrieveInstalledLanguagePacksResponse)Service.Execute(request);

// Create a CultureInfo array that represents the installed language packs.
System.Globalization.CultureInfo[] cultures =
    new System.Globalization.CultureInfo[response.RetrieveInstalledLanguagePacks.Length];

for( int i = 0; i < response.RetrieveInstalledLanguagePacks.Length; i++ )
{
    cultures[i] = System.Globalization.CultureInfo.GetCultureInfo(response.RetrieveInstalledLanguagePacks[i]);
}
[Visual Basic .NET]
' Set up the CRM service.
Dim token As New CrmAuthenticationToken()
' You can use enums.cs from the SDK\Helpers folder to get the enumeration for Active Directory authentication.
token.AuthenticationType = 0
token.OrganizationName = "AdventureWorksCycle";
 
Dim service As New CrmService()
service.Url = "http://<servername>:<port>/mscrmservices/2007/crmservice.asmx";
service.CrmAuthenticationTokenValue = token;
service.Credentials = System.Net.CredentialCache.DefaultCredentials

' Retrieve the Locale IDs from the server.
Dim request As New RetrieveInstalledLanguagePacksRequest()
Dim response As RetrieveInstalledLanguagePacksResponse = CType(Service.Execute(request), RetrieveInstalledLanguagePacksResponse)

' Create a CultureInfo array that represents the installed language packs.
Dim cultures(response.RetrieveInstalledLanguagePacks.Length - 1) As System.Globalization.CultureInfo

For i As Integer = 0 To response.RetrieveInstalledLanguagePacks.Length - 1
   cultures(i) = System.Globalization.CultureInfo.GetCultureInfo(response.RetrieveInstalledLanguagePacks(i))
Next i

See Also

Concepts

Reference


© 2010 Microsoft Corporation. All rights reserved.


Show:
© 2014 Microsoft