[delphizip] Re: Translatable strings for Dlls

  • From: "R. Peters" <russellpeters@xxxxxxxxxxx>
  • To: <delphizip@xxxxxxxxxxxxx>
  • Date: Thu, 22 Jul 2004 08:42:10 +1000

Having the strings as resources is the most portable unless you need to
support multiple languages then it becomes a problem.
Also there is the problem of missing strings - some are quite critical to
operations.
(I don't like the idea of throwing an exception when, after a half hour
operation,  a string was missing for a warning message).
(we won't mention the problem of forgetting to link the resources).
I thought that moving the strings to ResourceString's might make things
easier but it makes it much easier to end up with duplicate strings.
I could implement a modified version of a tool I had planned (for storing
edited strings on the form) and have it so you can edit the strings and
compile them (again) - the resource compiler is readily available (I think
included with Delphi), or if it wrote a script Delphi will compile it.

As another thought - I could link the default (US) resources to the dlls so
the defaults are always available (unless the dlls cannot be loaded)
Again this would be more efficient with a single dll.

Should anyone be interested it is now a trivial mater to use resource dlls
(even one containing all languages provided they are designed right) .

- Russell Peters
----- Original Message ----- 
From: "cplim" <cplim@xxxxxxxxxx>
To: <delphizip@xxxxxxxxxxxxx>
Sent: Wednesday, July 21, 2004 8:54 PM
Subject: [delphizip] Re: Translatable strings for Dlls


As this is a general tool, having the strings in a resource file would be a
very welcomed idea.
I went into zipmaster source files to change some strings too.
With the strings in resource file, I will be able change the strings for
various applications so that messages comes out closer to the lingo of a
particular group of users.  Computer savvy, non-IT literate, different
languages etc.
If the strings were to be stored in components, would it make it not
protable?
Having them in .res allows me to keep one version of source and multiple
version of .res and compile different exe versions.


cplim
----- Original Message -----
From: "R. Peters" <russellpeters@xxxxxxxxxxx>
To: <delphizip@xxxxxxxxxxxxx>
Sent: Wednesday, July 21, 2004 6:09 AM
Subject: [delphizip] Re: Translatable strings for Dlls


Thinking a bit heavier ..
If the strings were not stored as resources (stored Unicode) then I think I
could do it.
It would need a string in the component for the error 'cannot load error
strings' - this editable string would be stored in the dfm (resources) and
can be set to whatever the designer thinks appropriate (of course if it is
not needed then it can be set from the compressed strings).
It would be conceivable to combine it with a joined version of the other
dlls (so only have one dll to handle).
To change language it would have to select the required compressed data,
undeflate it and then convert to 'normal' string.
Probably best to do that in Delphi - do all strings at once.
Of course to combine the dlls means they will have to be made fully
re-entrant (think I can cure last few problems with that).
If we supply a simple utility to edit the required strings (complete with
sample arguments) I am sure someone will do it and send the results (can
probably extract the Unicode strings from the resource files too) so they
can be added.
- Russell Peters
----- Original Message -----
From: "James Turner" <james.d.h.turner@xxxxxxxxxxxx>
To: <delphizip@xxxxxxxxxxxxx>
Sent: Monday, July 19, 2004 7:37 PM
Subject: [delphizip] Re: Translatable strings for Dlls


Lots of work, but something I've considered is placing zip data in DLLs
together with inflate code. That way multiple languages can be easily
accomodated within a single DLL.

Traditionally, only exe files are self-extractors but DLLs could operate as
self-extractors too.

James Turner

>
> From: "R. Peters" <russellpeters@xxxxxxxxxxx>
> Date: 2004/07/19 Mon AM 12:59:12 GMT
> To: <delphizip@xxxxxxxxxxxxx>
> Subject: [delphizip] Translatable strings for Dlls
>
> Anyone interested in having the main messages from the dlls stored as
> resources (with the ZipMaster strings)?
> It probably would not include the Trace and Verbose messages.
>
> It involves moving the formatting of the strings to ZipMaster itself but
it
> would be handled by Windows wvsprintf routine (not format).
> The resources (optionally ResourceStrings) would be accessed by ZipMaster
so
> provides various ways to select language strings.
>
> - Russell Peters
>
> -----------
> To unsubscribe from this list, send an empty e-mail
> message to:
>   delphizip-request@xxxxxxxxxxxxx
> and put the word unsubscribe in the subject.
>

-----------------------------------------
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.


-----------
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: