MessageManager.AddLanguage Method (PIA)

Use this method to add a message set to the MessageManager object, and associate that message set with a locale. In subsequent calls to MessageManager object methods, the caller needs to identify the message set name, not the locale.

Any number of message sets can be associated with a single locale.

Definition

[Visual Basic .NET]

Imports Microsoft.CommerceServer.Interop
…
Public Sub AddLanguage(bstrLanguage As String,
  Locale As Integer)

[C#]

using Microsoft.CommerceServer.Interop;
…
public void AddLanguage(stringbstrLanguage,
  intLocale);

Parameters

[Visual Basic .NET]

  • bstrLanguage
    A String that contains the name for the message set to add to the MessageManager object.
  • Locale
    An Integer that uniquely identifies the locale to associate with the added message set.

[C#]

  • bstrLanguage
    A string that contains the name for the message set to add to the MessageManager object.
  • Locale
    An int that uniquely identifies the locale to associate with the added 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.

[Visual Basic .NET]

Example

' oMessageManager is a Commerce.MessageManager object
oMessageManager.AddLanguage("usa", 1033)

Requirements

Namespace: Microsoft.CommerceServer.Interop

Platforms: Windows 2000, Windows Server 2003

Assembly: mscsasphelplib (in mscsasphelplib.dll)

See Also

MessageManager Class

MessageManager.DefaultLanguage

DataFunctions.Locale

MessageManager.GetMessage

Copyright © 2005 Microsoft Corporation.
All rights reserved.