NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

InputLanguage.GetCurrentInputLanguage

Returns the input language for the current thread.

[Visual Basic]
Public Shared Function GetCurrentInputLanguage() As InputLanguage
[C#]
public static InputLanguage GetCurrentInputLanguage();
[C++]
public: static InputLanguage* GetCurrentInputLanguage();
[JScript]
public static function GetCurrentInputLanguage() : InputLanguage;

Return Value

An InputLanguage that represents the input language for the current thread.

Example [C#]

The following example gets and displays the name of the current input language. This code assumes Button1 and TextBox1 have been instantiated.

[C#]

public void MyCurrentInputLanguage() {
   //Get the current input language and print it in a text box.
   InputLanguage myCurrentLanguage = InputLanguage.GetCurrentInputLanguage();
   textBox1.Text = "Current input language is: " + myCurrentLanguage.GetCulture().EnglishName;
}

See Also

InputLanguage Class | InputLanguage Members | System.WinForms Namespace | GetDefaultInputLanguage