How to detect language changes?

S

Siegfried Heintze

I need to redundantly write C++ and C# programs to
(1) determine the input language (german, french, english...)
(2) determine changes in the input language (preferably a delegate rather
than polling!)

Can anyone guide me to the proper functions to call?
Thanks,
siegfried
 
F

Family Tree Mike

There are no pre-existing functions for either item. In general you could
try to split the text into words, and look for occurrances of the most common
words in each language. Search for "the", "of", "a" and you likely have
English. Search for "der", "die", "das", "ob", "einen", and you likely have
German.

It won't be easy...
 
S

Siegfried Heintze

If I run the program intl.cpl, I can change the keyboard type.

How is intl.cpl implemented?

How can I write a C# program to determine when someone has run intl.cpl and
changed the keyboard langauge?
Thanks,
Siegfried
 
S

Siegfried Heintze

I found it: I need to intercept WM_SETTINGSCHANGE. There is a sample program
in .NET Internationalization by Smith-Ferrier.

Now I have another question: how can I change to a DVORAK keyboard and
detect that change?

Thanks
Siegfried
 
A

Arne Vajhøj

Family said:
There are no pre-existing functions for either item. In general you could
try to split the text into words, and look for occurrances of the most common
words in each language. Search for "the", "of", "a" and you likely have
English. Search for "der", "die", "das", "ob", "einen", and you likely have
German.

It won't be easy...

Letter frequencies can also help.

Arne
 
A

Arne Vajhøj

Siegfried said:
If I run the program intl.cpl, I can change the keyboard type.

How is intl.cpl implemented?

How can I write a C# program to determine when someone has run intl.cpl and
changed the keyboard langauge?

So you are not looking to detect what language the text written
is in but just detect the windows language setting ?

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top