开发者

How I detect what language the current system

开发者 https://www.devze.com 2023-01-18 23:59 出处:网络
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

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

精彩评论

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