473,657 Members | 2,493 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2826
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_SETTINGSCHAN GE. There is a sample program
in .NET Internationaliz ation 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
1810
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 content of the document. I want to be able to intercept this event and say "yes" or "no" to it, or, at least be able to be notified that a change is about to happen or has just happened. The "content" has to be anything about the page -...
1
1892
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 beforeupdate event in all forms ? There are any property that indicate the changed fields ? or I have to compare all field values with old values ?
1
1281
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 detect if there is any change on any control when closing then form, or on record change . I know which events I should use, but I can't see any property to find if my controls have changes.
3
4482
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
4182
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 connected to a SQL mdf., on the form I have a regexDataGridView for the table regex for navigation and viewing purpose only
7
2641
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
5372
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 are configured to use Notepad to open the file by default and if they are configured to use Notepad by default I want it to remain that way rather than retrieve the text into my app or force the user to use another app to read the file. I'm...
1
11797
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 can I detect the language settings in a computer? Thanks.
0
1564
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 LocationXML column where id=someId..... Is there any way to detect changes in XML datatype column before reading it?
0
8421
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8325
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8844
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8742
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8518
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5643
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2743
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1734
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.