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. Adding multilanguage support

Adding multilanguage support

Scheduled Pinned Locked Moved C / C++ / MFC
questiontutorial
2 Posts 2 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... What is the most useful way to change language in an application? I've read we can do that with explicit link for DLL (one DLL for each languages ressource). Example: - exported from french.dll file:

    extern "C" __declspec(dllexport) char* get_text(int id_text);

    - int the application:

    typedef char* (MY_FUNCTION)(int);
    HINSTANCE hInstance;
    MY_FUNCTION *pFunction;
    VERIFY(hInstance = ::Loadlibrary("c:\\winnt\\system32\\french.dll"));
    VERIFY(pFunction = (MY_FUNCTION*) ::GetProcAddress(hInstance, "get_text"));

    int id_text = 5427
    char* good_translation = (pFunction*)(id_text);

    Is that a good solution? Thanks for your suggestions... Hello World!!! :) from Raphaël

    A 1 Reply Last reply
    0
    • R Raphael Kindt

      Hi world... What is the most useful way to change language in an application? I've read we can do that with explicit link for DLL (one DLL for each languages ressource). Example: - exported from french.dll file:

      extern "C" __declspec(dllexport) char* get_text(int id_text);

      - int the application:

      typedef char* (MY_FUNCTION)(int);
      HINSTANCE hInstance;
      MY_FUNCTION *pFunction;
      VERIFY(hInstance = ::Loadlibrary("c:\\winnt\\system32\\french.dll"));
      VERIFY(pFunction = (MY_FUNCTION*) ::GetProcAddress(hInstance, "get_text"));

      int id_text = 5427
      char* good_translation = (pFunction*)(id_text);

      Is that a good solution? Thanks for your suggestions... Hello World!!! :) from Raphaël

      A Offline
      A Offline
      Alexander M
      wrote on last edited by
      #2

      use string resources in your software. Don't try it, just do it! ;-)

      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