MessageManager.GetLocale

Ee799003.c++_on(en-US,CS.10).gifEe799003.vb_off(en-US,CS.10).gif

Use this method to return a number that identifies the locale for the specified message set.

Definition

Function GetLocale(vtLanguage As Variant) As Long

Parameters

vtLanguage

A Variant 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

If this method completes successfully, it returns a Long used to identify the locale for the specified message set.

Error Values

This property sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to standard COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.

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.

For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.

Example

' oMessageManager is a Commerce.MessageManager object
oMessageManager.GetLocale("us")

See Also

MessageManager Object

MessageManager.GetMessage

MessageManager.AddLanguage


All rights reserved.