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 Application

Multilanguage Application

Scheduled Pinned Locked Moved C / C++ / MFC
7 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.
  • X Offline
    X Offline
    XKent
    wrote on last edited by
    #1

    Hi all!!! How to create multilanguge application, in which user can change a language during run-time, for example, selecting it from menu.:confused: Thanks.

    M C 2 Replies Last reply
    0
    • X XKent

      Hi all!!! How to create multilanguge application, in which user can change a language during run-time, for example, selecting it from menu.:confused: Thanks.

      M Offline
      M Offline
      Masaaki Onishi
      wrote on last edited by
      #2

      Hello, the codegurus around the world.;) We can load the resource DLL file in InitInstance() on the user selection or detection of the language OS.:cool: I think that this is the easiest way. However, we may need some tool to convert English resource file to Japanese resource file, for example. X| You can find some reference of the multi-language in MSDN help. Have a nice day!

      -Masaaki Onishi-

      X 1 Reply Last reply
      0
      • M Masaaki Onishi

        Hello, the codegurus around the world.;) We can load the resource DLL file in InitInstance() on the user selection or detection of the language OS.:cool: I think that this is the easiest way. However, we may need some tool to convert English resource file to Japanese resource file, for example. X| You can find some reference of the multi-language in MSDN help. Have a nice day!

        -Masaaki Onishi-

        X Offline
        X Offline
        XKent
        wrote on last edited by
        #3

        Thanks. ...but can you explain this more detailed, whith example.

        M 1 Reply Last reply
        0
        • X XKent

          Thanks. ...but can you explain this more detailed, whith example.

          M Offline
          M Offline
          Mukkie
          wrote on last edited by
          #4

          Try SetThreadLocale function. Create resources in required languages one resource for one language. For example, dialog IDD_ABOUT (English) and IDD_ABOUT (Spanish). Then use SetThreadLocale to choose Your thread locale. Loading IDD_ABOUT dilaog template will load proper version. But this function is only available on NT systems, afaik. On non-nt system You may try to dynamically change resource handle, but don't know if it work. I use SetThreadLocale with success in FileMaster, see: www.geocities.com/TeamMukippe/

          X 1 Reply Last reply
          0
          • M Mukkie

            Try SetThreadLocale function. Create resources in required languages one resource for one language. For example, dialog IDD_ABOUT (English) and IDD_ABOUT (Spanish). Then use SetThreadLocale to choose Your thread locale. Loading IDD_ABOUT dilaog template will load proper version. But this function is only available on NT systems, afaik. On non-nt system You may try to dynamically change resource handle, but don't know if it work. I use SetThreadLocale with success in FileMaster, see: www.geocities.com/TeamMukippe/

            X Offline
            X Offline
            XKent
            wrote on last edited by
            #5

            The problem is that my applictaion must work in all kind of windows system, even on win95:(

            M 1 Reply Last reply
            0
            • X XKent

              The problem is that my applictaion must work in all kind of windows system, even on win95:(

              M Offline
              M Offline
              Mukkie
              wrote on last edited by
              #6

              Create several language dll's and dynamically load that required one during application startup. Use AfxSetResourceHandle to set resource handle for MFC app. Maybe even it will be possible to change that handle in run-time??

              1 Reply Last reply
              0
              • X XKent

                Hi all!!! How to create multilanguge application, in which user can change a language during run-time, for example, selecting it from menu.:confused: Thanks.

                C Offline
                C Offline
                Carlos Antollini
                wrote on last edited by
                #7

                I do that. I use AfxSetResourceHandle(). I get the handle of the resources dll and then use AfxSetResourceHandle. You need to put the AfxSetResourceHandle in several parts of your code because I don't Know why the application loose it. Cheers!!! Carlos Antollini.

                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