Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Multilanguage calendar for MFC

Multilanguage calendar for MFC

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++question
9 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Raphael Kindt
    wrote on last edited by
    #1

    Hi world... I want to change the CMonthCalCtrl language. Is this possible? Is there another calendar control where I could do that? I don't use dotNET framework but MFC (I know...) Thanks for any advice!

    Hello World!!! :) from Raphaël

    _ C Mircea PuiuM 3 Replies Last reply
    0
    • R Raphael Kindt

      Hi world... I want to change the CMonthCalCtrl language. Is this possible? Is there another calendar control where I could do that? I don't use dotNET framework but MFC (I know...) Thanks for any advice!

      Hello World!!! :) from Raphaël

      _ Offline
      _ Offline
      _AnsHUMAN_
      wrote on last edited by
      #2

      Raphaël Kindt wrote:

      change the CMonthCalCtrl language

      Subclassing the Control is one way to do this.

      Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_

      R 1 Reply Last reply
      0
      • _ _AnsHUMAN_

        Raphaël Kindt wrote:

        change the CMonthCalCtrl language

        Subclassing the Control is one way to do this.

        Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_

        R Offline
        R Offline
        Raphael Kindt
        wrote on last edited by
        #3

        Could you give me more informations? After subclassing, what must I do to translate the text inside the calendar? Thanks for the reply.

        Hello World!!! :) from Raphaël

        1 Reply Last reply
        0
        • R Raphael Kindt

          Hi world... I want to change the CMonthCalCtrl language. Is this possible? Is there another calendar control where I could do that? I don't use dotNET framework but MFC (I know...) Thanks for any advice!

          Hello World!!! :) from Raphaël

          C Offline
          C Offline
          Cedric Moonen
          wrote on last edited by
          #4

          I think that the language of the control changes when you change the local settings of the computer (so if you are running on a french windows, it will be displayed in french). So, this is done automatically. It is like the Ok and cancel texts that appears on the message boxes.


          Cédric Moonen Software developer
          Charting control

          R 1 Reply Last reply
          0
          • R Raphael Kindt

            Hi world... I want to change the CMonthCalCtrl language. Is this possible? Is there another calendar control where I could do that? I don't use dotNET framework but MFC (I know...) Thanks for any advice!

            Hello World!!! :) from Raphaël

            Mircea PuiuM Offline
            Mircea PuiuM Offline
            Mircea Puiu
            wrote on last edited by
            #5

            The ways the dates are used and the way they are displayed are based on the Regional Settings of the Control Panel. There is a "silent way" to programmatically change those settings. You can use Rundll32.exe to call the Regional and Language Options Control Panel with an answer file that specifies the appropriate settings. The syntax for calling Rundll32.exe from the command line is as follows:

            Rundll32 shell32,Control_RunDLL intl.cpl,,/f:"Some_Path\Your_File.txt"

            That file must contain a [RegionalSettings] section that specifies the appropriate settings. You will have to work on the line containing the following information:

            Language="locale ID"LanguageGroup="language group ID","language group ID

            SkyWalker

            R 1 Reply Last reply
            0
            • C Cedric Moonen

              I think that the language of the control changes when you change the local settings of the computer (so if you are running on a french windows, it will be displayed in french). So, this is done automatically. It is like the Ok and cancel texts that appears on the message boxes.


              Cédric Moonen Software developer
              Charting control

              R Offline
              R Offline
              Raphael Kindt
              wrote on last edited by
              #6

              I know that. But the user must be able to change the language directly from the menu. At this time I'm writing new string ressource (DLL project) for each new language. When the user change the language I dynamically load the good ressource (inside DLL) for this language.

              Hello World!!! :) from Raphaël

              1 Reply Last reply
              0
              • Mircea PuiuM Mircea Puiu

                The ways the dates are used and the way they are displayed are based on the Regional Settings of the Control Panel. There is a "silent way" to programmatically change those settings. You can use Rundll32.exe to call the Regional and Language Options Control Panel with an answer file that specifies the appropriate settings. The syntax for calling Rundll32.exe from the command line is as follows:

                Rundll32 shell32,Control_RunDLL intl.cpl,,/f:"Some_Path\Your_File.txt"

                That file must contain a [RegionalSettings] section that specifies the appropriate settings. You will have to work on the line containing the following information:

                Language="locale ID"LanguageGroup="language group ID","language group ID

                SkyWalker

                R Offline
                R Offline
                Raphael Kindt
                wrote on last edited by
                #7

                That seems interesting... But only the application language must be change. Not all the Windows language. Could I use this method to only change my application language? Thanks for your reply.

                Hello World!!! :) from Raphaël

                Mircea PuiuM 1 Reply Last reply
                0
                • R Raphael Kindt

                  That seems interesting... But only the application language must be change. Not all the Windows language. Could I use this method to only change my application language? Thanks for your reply.

                  Hello World!!! :) from Raphaël

                  Mircea PuiuM Offline
                  Mircea PuiuM Offline
                  Mircea Puiu
                  wrote on last edited by
                  #8

                  No! In your case, you could derive a class for the base one and override the methods dealing with displaying text, where you could use some string resources you must create (which will contain the texts you write as translation texts).

                  SkyWalker

                  R 1 Reply Last reply
                  0
                  • Mircea PuiuM Mircea Puiu

                    No! In your case, you could derive a class for the base one and override the methods dealing with displaying text, where you could use some string resources you must create (which will contain the texts you write as translation texts).

                    SkyWalker

                    R Offline
                    R Offline
                    Raphael Kindt
                    wrote on last edited by
                    #9

                    Thanks a lot for yout reply. I have another question. which is the method's name to override? I'm looking for this method... But there is too much methods...

                    Hello World!!! :) from Raphaël

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups