[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gettext and lynx (Re: LYNX-DEV LYMessages_en.h translation)
From: |
Karl Eichwalder |
Subject: |
gettext and lynx (Re: LYNX-DEV LYMessages_en.h translation) |
Date: |
09 Apr 1998 10:25:08 +0200 |
"T.E.Dickey" <address@hidden> writes:
| yes - but if we do the gettext (or whatever) integration properly, those
| extra files are just data, like
|
| 00001 Hello world
| 00002 Do you wish to quit
|
| (and once assigned, we _don't_ change the numbers).
No, no -- this isn't how gettext works. And I think we're talking about
GNU gettext.
Please, have a look at the reference implementation:
http://www.suse.de/~ke/hello-1.3.16.tar.gz (200 k, yes, it's 200 k)
The gettext message file are organized like this (one entry):
#: src/hello.c:148
#, c-format
msgid "Try `%s --help' for more information\n"
msgstr "»%s --help« gibt weitere Informationen.\n"
You don't have to deal with number. Using the tools included in ist GNU
gettext package, it's pretty easy to update those message file. There's
a po-mode.el which helps the translator to do the translation.
The gettext manual explains _in_ _detail_, how the programmer has to
prepare the sources, to make all that work. To be short, define
#define _(String) gettext (String)
#define N_(String) (String)
#include <libintl.h>
and call in main()
setlocale (LC_ALL, "");
/* Set the text message domain. */
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
and then mark up the stings:
fputs (_("Too many arguments\n"), stderr);
--
Karl Eichwalder S.u.S.E. GmbH Fax +49-911-3206727
address@hidden Gebhardtstrasse 2 Mo & Th 13:00-18:00:
http://www.suse.de/~ke/ 90762 Fuerth, Germany Hotline +49-911-3247130
- gettext and lynx (Re: LYNX-DEV LYMessages_en.h translation),
Karl Eichwalder <=