
Multilanguage Programming
I suppose you have already solved the questions about date and number
formatting, etc.
After beeing using VB resource files I have created my own resource file
system. The way VB manages resources has various problems:
VB compiles resources within the EXE file, so if you want a program in 45
languages you must create 45 EXE files (which could fit on a CD-ROM, but
don't forget the compiling time).
VB is limited to about 32000 text resources in a project.
By the other hand, VB lets you use non-text resources, like bitmaps, etc.
In my experience, the most important are text resources. What I recommend
you is to create a MS-Access database with all the text resources, with
records like:
ResourceNumber,LanguageID,ResourceText
And make a little program in VB that edits and compiles theese resources in
a binary file "open for binary". One file per language. This binary file
should have a header table of resources, like:
File position Contents
1-4 Offset of beginning of resource No 1
5-6 Length of resource No 1
7-10 Offset of beginning of resource No 2
11-14 Length of resource No 2
Consider:
- This resource system will allow more than 32000 resources for an EXE
(resource number is a long)
- If you do it right and put ALL your literals (menu captions included) in
the resource file, you will only need to distribute an EXE and one resource
file for language.
- With a well-designed resource reading routine, the performance is very
similar to the VB resource system.
- Other things you may discover...
Hope this help you. I know this is only an outline, but I'm not permitted to
tell more details.
Jose Luis.
Quote:
>Hi,
>Can somebody tell me why we always have to recompile our program when
>we change something in our resource file ? We also have to recompile the
>resource
>file ?
>Does somebody have a better way to deal with multilanguage programs ?
>Is there a better way then using resource files ?
>Many thanks,
>Karel