PC Review


Reply
Thread Tools Rate Thread

How to detect language changes?

 
 
Siegfried Heintze
Guest
Posts: n/a
 
      10th Jul 2008
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

 
Reply With Quote
 
 
 
 
Family Tree Mike
Guest
Posts: n/a
 
      10th Jul 2008
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
>

 
Reply With Quote
 
Siegfried Heintze
Guest
Posts: n/a
 
      10th Jul 2008
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
> >

 
Reply With Quote
 
Siegfried Heintze
Guest
Posts: n/a
 
      10th Jul 2008
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
 
Reply With Quote
 
Arne Vajhøj
Guest
Posts: n/a
 
      10th Jul 2008
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
 
Reply With Quote
 
Arne Vajhøj
Guest
Posts: n/a
 
      10th Jul 2008
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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Detect Country and Language Abhishek Microsoft VB .NET 1 29th Dec 2008 11:59 PM
detect language .net framework Svyatoslav Microsoft Dot NET Framework 3 5th Apr 2005 06:53 PM
Save way to detect Browser Language Matthias S. Microsoft ASP .NET 1 30th Mar 2005 11:43 PM
Detect language automatically =?Utf-8?B?SmFzcGFy?= Microsoft Word Document Management 0 4th Mar 2004 10:16 AM
Auto Detect Language Glenis Microsoft Outlook Discussion 0 11th Feb 2004 01:13 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:37 AM.