Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 144
  • Last Modified:

Up and down of resource file's

I'm am a new comer to VB6, what are the advantage and dis-advantages of using resource file with mulitple string tables ????. i'm currently doing a project which has to be translated into English, Dutch, French, Italian, German and Polish. People have said to use ini files to store the string the read them out, with 1500 different strings to translate won't the slow the application down ?????? Please HELP All EXPERTS ROCK  
0
LPlate
Asked:
LPlate
1 Solution
 
cquinnCommented:
There is a problem with ini files if you have many strings to hold - Ini files can only be a maximum of 64kb in size - anything that goes over this limit will not be accessible.

Resource files can be any size, but you need to get hold of a Resource compiler - it used to come free with Microsoft help file authoring tools - I don't know if it still does.

Resources can also hold other things - graphics, sounds etc, which ini files cannot.

There was an example project using resource files on the VB install CD's - I think it was called ATM - a simulation of a multilingual cash machine - this will give you the basics
0
 
kdg2000Commented:
It is possible certainly to use INI the file, but the resource file is better.

For this purpose the editor of resources (tab of the menu Add-Ins\Add-In Manager is necessary to connect...). Will be started Add-In Manager. In it is necessary to find VB6 Resouce Editor and to select options 'Loaded\Unloaded' and ' Load on StartUp '. The option ' Add New Resource File ' in the tab 'Project' will appear.

Further about operation with Resource File:

In the help is written, that it is necessary to create the separate tables depending on the language and at change of regional installations the language table automatically varies. But for me it has failed.
And I have made all strings in one table, but with offset, for example: the English strings - ID 1-1000; French - ID 1001-2000 and so on.
And in the program such code:

Public LanguageProgramm As Language_Mode
Public Enum Language_Mode
    None = -1
    English = 0
    French = 1000
End Enum

Me.Label1.Caption = LoadResString (LanguageProgramm + 10)

Where '10' is an offset on the necessary string inside the array of strings with the identical language.
0
 
JoebobCommented:
The only disadvantage of using a single resource file with multiple string tables is that it will not work in Win9x or WinCE.  The only Microsoft OS that supports multiple string tables is WinNT, 2k, and XP.  If you want to use a single resource file for all of your strings and you need compatibility with the Win9x or CE environments, do the following.

Decide on resource id ranges such as 1 to 2000 is English, 2001 to 4000 is German, etc.  When your app loads, call the GetLocale function to find where you are and set an offset (i.e. offset would be 2000 for German).  Then when reading from the resource file, you would use LoadResString(EnglishResID + Offset).
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
Richie_SimonettiIT OperationsCommented:
I used multiple string tables in win98 whiout any problem. I suggest use it instead of ini files, or use a database if you want.
0
 
DanRollinsCommented:
Hi LPlate,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Save as PAQ -- No Refund.
    *** All good answers; tto few points to split.

LPlate, Please DO NOT accept this comment as an answer.
EXPERTS: Post a comment if you are certain that an expert deserves credit.  Explain why.
==========
DanRollins -- EE database cleanup volunteer
0
 
Richie_SimonettiIT OperationsCommented:
Good to me.
0
 
NetminderCommented:
Per recommendation, points NOT refunded and question closed.

Netminder
CS Moderator
0
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.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now