Hi all,
Bernd asked if it would be possible to compile MEM with different
languages to make things simpler for non-English distributions. Are
there any tools that can already do this for us?
I thought it would probably be very simple to write a tool which,
given an NLS strings file (e.g. MEM.DE), output a .h file with e.g.:
extern char *muschi_0_0;
extern char *muschi_0_1;
..
and a .c file with e.g.:
char *muschi_0_0 = "Speicher voll, %ld bytes zu wenig.\n";
char *muschi_0_1 = "Speicherkette zerst"rt! (konnte UMBs nicht
einklinken)\n";
..
and then instead of:
#define _(set,message_number,message)
kittengets(set,message_number,message)
we would have:
#define _(set,message_number,message)
kittengets(set,message_number,muschi_ ## set ## _ ## message_number)
where of course if we were translating a program that didn't already
"#define _ ... kittengets ..." we could just redefine "kittengets".
When building a non-default language version, we'd define some flag (I
guess "MUSCHI") and if that flag was defined we'd #include the
generated .h file and change the definition of _ and we'd also link in
the .c file, otherwise we wouldn't #include the .h file and wouldn't
link in the .c file.
Of course I haven't implemented the tool just in case it's already
been done :)
By the way, MUSCHI stands for Manipulating User Strings at
Compile-time to Help Internationalization, and it's also German for
another word for "cat" which I won't include in this mail in case it
triggers spam filters, and is also the name of my cat which died this
year :(
Regards,
David
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Freedos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-devel