Hi, I updated LOCALIZE:

http://www.coli.uni-sb.de/~eric/stuff/soft/ localize-04nov2003.zip

You now can give an "alternative message" after "@@@ " as an argument
to LOCALIZE. Unless your command line gets too long, this allows you
to replace 1 "echo" line by nothing more than 1 "localize" line (plus
1 line in each localize.* file for the various languages that you are
supporting):

LOCALIZE 9.10 %LANG% @@@ Your lang variable is set to:

With a suitable localize.de file and LANG and NLSPATH settings, this
would show:

Deine lang Variable ist gesetzt auf: de

Without a localize.de file or if LANG or NLSPATH point "into the void":

Your lang variable is set to: foo

If you provide a localize.de file but forget to add message 9.10 to it:

Your lang variable is set to: [Undefined message 9.10] de

The errorlevel is only 0 if LANG and NLSPATH point to a proper file
and the requested message is found. Otherwise, errorlevel 1 is returned
(or 2, if the first argument of localize is no x.y style number and the
help screen is displayed). By the way, the help screen is now very short
in the binary, as the better way is to provide a longer one in the
localize.* files for each language (you can use \r\n to create multi-line
messages).

Syntax of LOCALIZE now is:

LOCALIZE x.y [optional text] [@@@ alternative text]

If you provide no alternative text, no alternative text is shown if the
message was not found or the NLSPATH / LANG setting was wrong - but still
the errorlevel is set, of course. So you can do that:

LOCALIZE 1.23
if [%errorlevel%]==[0] goto okay
echo Bad luck, no translation available. So this is the English
echo version of the multi-line message number 1.23 ....
:okay

And of course you can do - as with the old version:

LOCALIZE 1.23
if [%errorlevel%]==[1] echo This is the alternative message

However, this will now give you an extra empty line, so you better
do provide an alternative message ;-)).

Eric
(eric -at- CoLi.Uni-SB.DE)