Share via


Recognizers.GetDefaultRecognizer Method

Recognizers.GetDefaultRecognizer Method

Returns the default recognizer for a known language, specified by a national language support (NLS) language code identifier (LCID).

Definition

Visual Basic .NET Public Function GetDefaultRecognizer( _
ByVal lcid As Integer _
) As Recognizer
C# public Recognizer GetDefaultRecognizer(
int lcid
);
Managed C++ public: Recognizer* GetDefaultRecognizer(
int *lcid
);

Parameters

> > >
lcid System.Int32. The language code identifier (LCID) of the language for which you are retrieving the default recognizer.

0 Default. The method uses the user's locale setting to determine which default recognizer to retrieve. If the user has not specified a locale in Regional Options, the method uses the locale that was specified for the computer.
System.Int32 The method uses the locale identifier to determine which default recognizer to retrieve.

Return Value

Microsoft.Ink.Recognizer. Returns the requested recognizer.

Exceptions

COMException Leave Site:

Remarks

Each language can have a default recognizer. For example, a user can have a default recognizer for U.S. English and a default recognizer for French. If no locale is specified, this method returns the recognizer for the active input locale. To select the active input locale, in the Regional and Language Options in ControlPanel, on the Languages tab, click Details, and then select Default input language.

For more information about national language support (NLS), see NLS Terminology Leave Site.

This method throws an exception if the language code identifier (LCID) is not a known locale or if a recognizer is not installed for the requested locale. To find a recognizer for a locale neutral language, enumerate over the Recognizers collection and check the Languages property of each Recognizer object. For a table of LCIDs, see Table of Language Identifiers Leave Site. For a list of the Microsoft® recognizers, see Using the Recognizers Collection.

Examples

[C#]

This C# example gets the default recognizer for the Japanese language by using the LCID for Japanese and identifies it with the Recognizer object, recoDefault.

using Microsoft.Ink;
// . . .
Recognizers theRecognizers = new Recognizers();
int theLCID = 0x0411;
// Get the default recognizer for Japanese.
Recognizer recoDefault = theRecognizers.GetDefaultRecognizer(theLCID);

[Visual Basic .NET]

This Microsoft Visual Basic® .NET example gets the default recognizer for the Japanese language by using the LCID for Japanese and identifies it with the Recognizerobject, recoDefault.

Imports Microsoft.Ink
' . . .
Dim theRecognizers As Recognizers = New Recognizers()
Dim recoDefault As Recognizer
Dim theLCID As Integer = &H411   ' The LCID for Japanese
'Get the default recognizer for Japanese.
recoDefault = theRecognizers.GetDefaultRecognizer(theLCID)
  

See Also