开发者

How I detect what language the current system

How I开发者_StackOverflow中文版 detect what language the current system?

How I 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜