473,398 Members | 2,335 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

How to detect language changes?

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
5 2815
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ben Rush | last post by:
I'm sure there is something out there for this, but I want to detect if document content has been changed for whatever reason. Say someone creates a javascript function which, say, changes some...
1
by: Jordan | last post by:
Hello ! I wish to detect the changes made and register in another table, Can I load a function that runs standalone and detects the changes himself ? Or I have to call the function in the...
1
by: Ludovic Lemarinel | last post by:
Hi, I've got a Tab Control, with a lot of tabs, and a lot of controls in each tab (textboxes, comboboxes, listviews, checkboces, etc...). As these controls are updating a Database, I need to...
3
by: ton | last post by:
How can I detect that the user has modified the data on the page where several textboxes, checkboxes and dropdownlist exist. Ton
2
by: GS | last post by:
How do I properly detect row change before allowing moving to next row? I tried using RowLeave . here is brief descript of the form setup. I have ieStringTmpDataSetwith regex table...
7
by: Peter | last post by:
Hello I have an UTF string, how can i detect what language it is? thanks from Peter (cmk128@hotmail.com)
36
by: Don | last post by:
I wrote an app that alerts a user who attempts to open a file that the file is currently in use. It works fine except when the file is opened by Notepad. If a text file is opened, most computers...
1
by: =?Utf-8?B?Sm9obg==?= | last post by:
Hi, My C# program supports different languages using resource files. I need a way to detect the language used in the host computer, then the software can change its own language settings. How...
0
by: saadkhan | last post by:
I have a table named 'UnitsLocations' in which there are two columns, id of uniqueidentifier datatype and LocationXML of XML datatype. I just need to detect whether any changes have made in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.