How to detect language changes?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?U2llZ2ZyaWVkIEhlaW50emU=?=

    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

  • =?Utf-8?B?RmFtaWx5IFRyZWUgTWlrZQ==?=

    #2
    RE: How to detect language changes?

    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
    >

    Comment

    • =?Utf-8?B?U2llZ2ZyaWVkIEhlaW50emU=?=

      #3
      RE: How to detect language changes?

      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

      Comment

      • =?Utf-8?B?U2llZ2ZyaWVkIEhlaW50emU=?=

        #4
        RE: How to detect language changes?

        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

        Comment

        • =?UTF-8?B?QXJuZSBWYWpow7hq?=

          #5
          Re: How to detect language changes?

          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

          Comment

          • =?UTF-8?B?QXJuZSBWYWpow7hq?=

            #6
            Re: How to detect language changes?

            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

            Comment

            Working...