How To Detect Language Changes While Runtime ? (C#)

青春壹個敷衍的年華 提交于 2019-12-08 19:28:35

问题


I want to detect when the user is changing his language on the keyboard. For example, I want to know if the user is using English, and then changing the language to French. I want to detect this change from all the active threads. I mean that I want to know when that change happens in the OS, And not in some specific thread.. I'm using C# language.(Console Application)

Can Anyone help me to figure it out? I will be glad to some help.. Thank You.


回答1:


If you develop using WinForms use InputLanguageChanging event




回答2:


This is how you get the current keyboard layout: How to determine the current input language?

This is how you change it: Change Keyboard Layout for Other Process



来源:https://stackoverflow.com/questions/18814500/how-to-detect-language-changes-while-runtime-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!