By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,458 Members | 1,463 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,458 IT Pros & Developers. It's quick & easy.

How to detect language changes?

P: n/a
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

Jul 10 '08 #1
Share this Question
Share on Google+
5 Replies


P: n/a
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...
"Siegfried Heintze" wrote:
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
Jul 10 '08 #2

P: n/a
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

"Family Tree Mike" wrote:
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...
"Siegfried Heintze" wrote:
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
Jul 10 '08 #3

P: n/a
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
Jul 10 '08 #4

P: n/a
Family Tree Mike wrote:
"Siegfried Heintze" wrote:
>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!)
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
Jul 10 '08 #5

P: n/a
Siegfried Heintze wrote:
"Family Tree Mike" wrote:
>"Siegfried Heintze" wrote:
>>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?
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...
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
Jul 10 '08 #6

This discussion thread is closed

Replies have been disabled for this discussion.