Problem in Localization with VB 6.0 using Resource Files


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.


Who is Participating?
Éric MoreauConnect With a Mentor Senior .Net ConsultantCommented:
points to emoreau
Éric MoreauSenior .Net ConsultantCommented:
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).
it_nehapatelAuthor Commented:

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,
Éric MoreauSenior .Net ConsultantCommented:
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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.