How I开发者_StackOverflow中文版 detect what language the current system?
The "EN" label in the screenshot doesn't actually refer to the language of the system, but to a selected input keyboard. To get this information programmatically, you can use the CurrentInputLanguage
property of the InputLanguage
type.
In C# you can do the following:
string inputLanguage = System.Windows.Forms.InputLanguage.CurrentInputLanguage.LayoutName;
In case of EN you will get US as an inputLanguage value.
精彩评论