Solved

Problem in Localization with VB 6.0 using Resource Files

Posted on 2004-03-25
5
132 Views
Last Modified: 2010-05-01
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.

Thanks in advance.

Regards,
Neha

0
Comment
Question by:it_nehapatel
  • 3
5 Comments
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 10676402
I recommend not to use strings tables based on Windows settings.

What I recommend is to use a resource file with a single table in which you define ranges for each language you want to support into which only an offset will change. For example, if you want to support English and French, you would do something like this:

1 - Hi
2 - Goodbye

10001 - Salut
10002 - Aurevoir

1 is the same as 10001 and 2 is the same as 10002. All you need to know from the user is the prefered language to set your offset. If the user choose English, your offset is 0. If French is selected, then the offset is 10000. In all your call to the resource file, you need to say (offset + 1) instead of (1).
0
 

Author Comment

by:it_nehapatel
ID: 10676558
Hi,

Thanks for the prompt reply. This is one way to do the localization.

Here the application has to get the input from the user and work accordingly. But I want my application gets the current system locale automatically and works accordingly. User don't have to supply any inputs.

Is there any way to do this?

Thanks and Regards,
Neha
0
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 10676664
The problem if you look into the locale is that there are many French(...). If the user doesn't exactly what have been used into create the resource file, the first table is used.
0
 
LVL 69

Accepted Solution

by:
Éric Moreau earned 125 total points
ID: 11255766
points to emoreau
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now