7

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.

Aviv
  • 456
  • 1
  • 7
  • 16
  • The user changed his keyboard layout, not his language and not his CurrentCulture. Windows will keep talking English to him. Changing the language requires a logout+login and the Ultimate edition of Windows with the proper MUI pack installed. At which point you'll be talking French as well. Responding to this from a console mode app is a lost cause anyway. – Hans Passant Sep 15 '13 at 18:31
  • @HansPassant, I meant to the same thing that happend wehn you press Alt + Shift on your keyboard.. In this case it's a lost cause too? and if so, why? – Aviv Sep 15 '13 at 19:10

2 Answers2

1

If you develop using WinForms use InputLanguageChanging event

Gary C.
  • 116
  • 2
  • 1
    Actually i'm using Console Application. Do you have some example for console application? – Aviv Sep 15 '13 at 17:21
0

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

Community
  • 1
  • 1
olydis
  • 3,192
  • 13
  • 28
  • 1
    That is not the question. – Rotem Sep 15 '13 at 16:15
  • since? i mean Aviv may focus more on detecting the **change** of input language in the OS, I'm not sure whether you get further than what is described in the first stackoverflow link I posted... – olydis Sep 15 '13 at 16:18