multilingual application in C++

Discussion in 'C++' started by Imran, Aug 29, 2006.

  1. Imran

    Imran Guest

    Hello all

    I am planning to write a win32 console application which has needs to
    run on English and German windows OS.
    Can you please help me to start , Thank yoyu

    Best Regards,
    Imran, Aug 29, 2006
    #1
    1. Advertising

  2. Imran

    Guest

    What you need is a Stringtable.
    ..DLLs aren't just for code, they hold data as well.
    Create a resource DLL for each language.

    In the .RC file you need something like
    #define IDS_HELLO 1
    #define IDS_WORLD 2

    STRINGTABLE
    {
    IDS_HELLO, "Hello"
    IDS_WORLD, "World"
    }

    Of course the variable names can be in any language you like, which is
    both good and bad. I once had to deal with an app whose variables were
    in Dutch.

    There is an API cunningly called "LoadString" and you will also need
    LoadLibrary.

    Most examples assume you're loading strings from your own EXE, so watch
    out for that.

    Also, having worked for German firms, I'm aware that you may well have
    English (or other) speakers on a German installation of Windows.
    I find it's best to default to the install language, but have a highly
    visible option that allows them to change. Also you should always
    install both language versions of the DLL.

    Also, if you're going to communicate with a user, you want it to have
    the default for *that* user, not the system's nationality. Try
    something like
    My Computer\HKEY_CURRENT_USER\Control Panel\International\sCountry
    in the registery.

    I know you're starting off with a console app, but one thing to be
    aware of is that for most things almost all languages take more
    characters to say the same thing than English.
    Thus you should make the fields in your dialog boxes bigger. It's very
    very much easier to do this when you first build the application than
    to fix this later.

    DominiConnor
    DCFC The Pimp
    Imran wrote:
    > Hello all
    >
    > I am planning to write a win32 console application which has needs to
    > run on English and German windows OS.
    > Can you please help me to start , Thank yoyu
    >
    > Best Regards,
    , Aug 29, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. JoanneC
    Replies:
    0
    Views:
    421
    JoanneC
    Aug 28, 2003
  2. JoanneC
    Replies:
    0
    Views:
    514
    JoanneC
    Aug 30, 2003
  3. Replies:
    2
    Views:
    306
    Robert Haken [MVP]
    Oct 12, 2006
  4. bsm
    Replies:
    2
    Views:
    920
  5. raju

    Multilingual application

    raju, Aug 1, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    566
Loading...

Share This Page