MessageManager.GetLocale Method (PIA)
Use this method to return a number that identifies the locale for the specified message set.
Definition
[Visual Basic .NET]
Imports Microsoft.CommerceServer.Interop
…
Public Function GetLocale(vtLanguage As Object) As Integer
[C#]
using Microsoft.CommerceServer.Interop;
…
public int GetLocale(objectvtLanguage);
Parameters
[Visual Basic .NET]
- vtLanguage
An Object that contains the name of the message set for which you want to retrieve the locale. This message set must have been added to the MessageManager object through a previous call to the AddLanguage method.
[C#]
- vtLanguage
An object that contains the name of the message set for which you want to retrieve the locale. This message set must have been added to the MessageManager object through a previous call to the AddLanguage method.
Return Values
[Visual Basic .NET] If this method completes successfully, it returns an Integer used to identify the locale for the specified message set.
[C#] This method returns an int used to identify the locale for the specified message set.
Exceptions
This method may throw one of many mapped exceptions or an exception of type COMException. See Standard COM Errors for additional details.
Remarks
Like the GetMessage method, the GetLocale method is usually not called from within a site. Instead, it is used by the pipeline component to retrieve the locale for a message that describes an error that the component has encountered.
[Visual Basic .NET]
Example
' oMessageManager is a Commerce.MessageManager object
oMessageManager.GetLocale("us")
Requirements
Namespace: Microsoft.CommerceServer.Interop
Platforms: Windows 2000, Windows Server 2003
Assembly: mscsasphelplib (in mscsasphelplib.dll)
See Also
Copyright © 2005 Microsoft Corporation.
All rights reserved.