Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2004
    Posts
    2

    Exclamation Unanswered: Problem in Localization with VB 6.0 using Resource Files

    Hi,

    I am doing localization of my UI in VB 6.0. I have done that using Resource File - Multiple String Tables. While I am running my project in my development environment, it picks up and display the UI strings based on the current system locale and works properly.

    The problem is when I am making the executable of my project and running, it always takes strings from the first string table in the resource file. How can I solve this issue?? Any information regarding localization would be appreciated.

    -Neha

  2. #2
    Join Date
    Mar 2004
    Location
    www.scirocco.ca
    Posts
    346

    Re: Problem in Localization with VB 6.0 using Resource Files

    I have come across the same issue before. Your VB app will only use one String Table for each executable. Either you make multiple executables each using a different string table, or you make one string table with all the different languages and an Offset value.i.e.

    Private Const OFFSET_VALUE_ENGLISH =0
    Private Const OFFSET_VALUE_FRENCH =3

    0 Open
    1 Close
    2 File
    3 Ouvrir
    4 Fermer
    5 Fichier

    MsgBox LoadResString(0 + OFFSET_VALUE_ENGLISH) 'Returns Open

    MsgBox LoadResString(0 + OFFSET_VALUE_FRENCH) 'Returns Ouvrir

    Alternativly there are third-party applications that let you have multiple string-tables in each executable.
    http://www.scirocco.ca/images/banner...occobanner.gif

    Download for FREE the ADO/DAO Data Controls that makes life EASIER developing database applications in: VB, FoxPro, Access, VC++, .NET etc... Navigate, Add New, Delete, Update, Search, Undo and Save your changes. Supports Disconnected Recordsets and Transactions!

    Or try our Ask An Expert service to answer any of your questions!

  3. #3
    Join Date
    Mar 2004
    Posts
    2

    Exclamation

    Hi,

    Thanks for the prompt reply. Here application has to take input from the user for the selection of the language.

    Is there any way in which application selects the language based on the current system locale? How can I get the current system locale in VB? So I can set the offset based on the locale. I tried wih GetDefaultLCID but it returns only the default one i.e. 1033 ( English ). Not the changed one.

    Regards,
    Neha

  4. #4
    Join Date
    Mar 2004
    Location
    www.scirocco.ca
    Posts
    346
    My pleasure.

    If you are using Visual Basic 6.0 take a look a this link:

    http://msdn.microsoft.com/library/de...onalissues.asp

    If you are using VB.NET take a look at this one:

    http://msdn.microsoft.com/library/de...nalization.asp
    http://www.scirocco.ca/images/banner...occobanner.gif

    Download for FREE the ADO/DAO Data Controls that makes life EASIER developing database applications in: VB, FoxPro, Access, VC++, .NET etc... Navigate, Add New, Delete, Update, Search, Undo and Save your changes. Supports Disconnected Recordsets and Transactions!

    Or try our Ask An Expert service to answer any of your questions!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •