InputLanguage.Culture Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the culture of the current input language.
public:
property System::Globalization::CultureInfo ^ Culture { System::Globalization::CultureInfo ^ get(); };
public System.Globalization.CultureInfo Culture { get; }
member this.Culture : System.Globalization.CultureInfo
Public ReadOnly Property Culture As CultureInfo
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.
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;
}
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;
}
Public Sub MyCulture()
' Gets the current input language.
Dim myCurrentLanguage As InputLanguage = InputLanguage.CurrentInputLanguage
' Gets the culture for the language and prints it.
Dim myCultureInfo As CultureInfo = myCurrentLanguage.Culture
textBox1.Text = myCultureInfo.EnglishName
End Sub
Applies to
See also
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin