I am in the learning about translating programs.
I was aware of that page:
https://ftp.gnu.org/old-gnu/Manuals/glibc-2.2.3/html_chapter/libc_8.html
Basicaly, there is two different methods (and set of C functions) to
translate a string.
The first method is:
char * catgets (nl_catd catalog_desc, int set, int message, const char *string)
where catalog_desc is the external translation file you opened with catopen,
set is a number identifying the set of messages in the catalog you
care about (menu1, step200, etc),
message is a number identifying the message,
string is what to write if no string is found, and help the
programmer not to have the translation file open to
understand the code it read.
The second method is gettext:
char * gettext (const char *msgid) which translate a string to an other string.
the equivalent of the catalog is selected with:
char * textdomain (const char *domainname)
"The textdomain function sets the default domain, which is used in all
future gettext calls, to domainname. [...]
Before the first call to textdomain the default domain is messages.
This is the name specified in the specification of the gettext API.
This name is as good as any other name. No program should ever really
use a domain with this name since this can only lead to problems."
Now, Jim Hall have made a library, catgets, to use the first method.
He also use that for his fdi (FREEDOS installer).
He also suggest to use catalog file written in plain ASCII (no
accentuated letters) to facilitate translations.
Now the fun part about fdisk, is that it contains the catgets.zip
library created by Jim Hall, which contains his HOWTO doc file about
translatings. But the fdisk source does not appears to me (at first
glance) to use it... yet.
I have seen a gernan version of the source too, but that directly
change the code source messages.
Well, Jim Hall does not seems to mention the gettext method, which I
believe to be much more used in the open-source in general... That
said, I tend to feel the catgets feel easier for me to understand, and
I see no real reason to insist on gettext pernsonaly.
Now, the code source for catgets seems to expect Turbo C++ 3.1 and the
code source of fdisk seems to expect Turbo C++ 3.0. I would prefer a
more open C (I don't think either code is in C++, but just C)
implementation.
I might try to go further and try to compile actual code eventually.
------------------------------------------------------------------------------
_______________________________________________
Freedos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-devel