lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gettext and lynx (Re: LYNX-DEV LYMessages_en.h translation)


From: James Spath
Subject: Re: gettext and lynx (Re: LYNX-DEV LYMessages_en.h translation)
Date: Thu, 9 Apr 1998 07:59:30 -0400

On Apr 9, 10:25am, Karl Eichwalder <address@hidden> wrote:
} "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
} |   (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);
}-- End of excerpt from Karl

At one point I used the translation algorithm that is in PGP to add
language support to MTools, but didn't get permission to use that code
so dropped the project.

The GNU gettext package seemed daunting at first view, but after
looking at it again I agree it is the way to go for best support,
licensing issues, ease of maintenance and not-to-reinvent-the-wheel.
I've browsed the info file and my only issue is how UNIX and Emacs
dependent that package seems to be.  However, I think this can either
be worked-around or that hooks for other OS language support are out
there somewhere.

If I get a chance, I'll hack up some demo code to hook into Lynx.
Unless someone beats me to it.
-- 
------
<http://www.cs.indiana.edu/picons/db/users/us/md/lib/bcpl/jspath/face.xbm>
Marvin the Paranoid Android says:
No one can help me, not that anyone has tried of course.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]