Keyboard Support

Contact and Search

Keyman.com Homepage

Header bottom

Keyman.com

Other versions
Version 18.0Version 17.0 (current version)Version 16.0Version 15.0Version 14.0

Index

On this page

KMManager.registerAssociatedLexicalModel()


Summary

The registerAssociatedLexicalModel() method registers a lexical model with the associated language ID.

Syntax

KMManager.registerAssociatedLexicalModel(String langId) 

Parameters

langId
The BCP 47 language ID

Returns

Returns true if a new lexical model is loaded (different from the currently loaded lexical model), false otherwise.

Description

Use this method after switching keyboard languages so the LMLayer will load and use the correct lexical model for generating suggestions.

Examples

Example: Using registerAssociatedLexicalModel()

The following script illustrates the use of registerAssociatedLexicalModel():

    String langId = "ta";
    KMManager.registerAssociatedLexicalModel(langId);

See also