InputLanguage.Culture Property

Definition

Gets the culture of the current input language.

C#
public System.Globalization.CultureInfo Culture { get; }

Property Value

A CultureInfo that represents the culture of the current input language.

Examples

The following code example gets the InputLanguage for the current input language. A text box displays this input language and the name of the input language.

This code assumes that textBox1 has been instantiated.

C#
public void MyCulture() {
   // Gets the current input language.
   InputLanguage myCurrentLanguage = InputLanguage.CurrentInputLanguage;

   // Gets the culture for the language  and prints it.
   CultureInfo myCultureInfo = myCurrentLanguage.Culture;
   textBox1.Text = myCultureInfo.EnglishName;
}

Applies to

Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

See also