[delphizip] Re: Translatable strings for Dlls

  • From: "R. Peters" <russellpeters@xxxxxxxxxxx>
  • To: <delphizip@xxxxxxxxxxxxx>
  • Date: Sat, 24 Jul 2004 11:17:35 +1000

Overall I would agree with you but not certain that we could get away
storing the strings not in Unicode (what if used with different code page? -
some countries have alternates) but much better if we don't have to.
I will attempt to put together a message editor to write the rc file.
In the past I have found that if you add a resource script to the project
(unless it is a component) the IDE compiles and links it.
For those using run-time packages the resource can be linked to it.
To save the strings as a (compressed?) text file you would have use a
separator acceptable to all languages and that does not exist in any of the
strings (or specify it at start of each file) or maybe better to use Delphi
streaming. (id,len,string ?)
- Russell Peters
----- Original Message ----- 
From: "James Turner" <james.d.h.turner@xxxxxxxxxxxx>
To: <delphizip@xxxxxxxxxxxxx>
Sent: Friday, July 23, 2004 9:45 PM
Subject: [delphizip] Re: Translatable strings for Dlls


Having considered the problem further, I believe the best solution (to
include all language files) would be as follows :-

1) Create text files (notepad) containing all language strings (and keys).
2) Add these files as BINARY resources to a separate language module.
3) Write necessary code to cache the required strings when a language is
selected (at runtime).

I would place the code to extract the strings, etc. in the language module,
however, since there is a feeling that the DLLs should be discarded, some
people may disagree. This solution would, after all, add a third DLL.
However, this general design concept could be adapated to a pure Delphi
solution with little difficulty. It would simply require a resource file to
be maintained and included in the ZipMaster.pas module. The resource file
could be built using the BRCC32.exe utility that is shipped with Delphi.

James Turner

-----------------------------------------
Email provided by http://www.ntlhome.com/


-----------
To unsubscribe from this list, send an empty e-mail
message to:
  delphizip-request@xxxxxxxxxxxxx
and put the word unsubscribe in the subject.

-----------
To unsubscribe from this list, send an empty e-mail 
message to:
  delphizip-request@xxxxxxxxxxxxx 
and put the word unsubscribe in the subject.

Other related posts: