bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: Documentation of ngettext


From: Akim Demaille
Subject: Re: Documentation of ngettext
Date: 27 Nov 2001 20:08:43 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Artificial Intelligence)

| Akim Demaille writes:
| > I'd like to suggest that the default macros, with !ENABLE_NLS,
| > described in the documentation, be extended with the new functions.
| > In particular, if someone --disables-nls
| 
| Thanks for the suggestion. I've put this on my todo list for gettext 0.11.
| 
| > the project really needs something like:
| > 
| > #ifdef HAVE_LOCALE_H
| > # include <locale.h>
| > #endif
| 
| Nowadays all systems have <locale.h>.

Hm, what system do you consider as a `nowadays' system'?  Given that
gettext.m4 looks for it, it seemed like a logical thing to #if HAVE_ it.

| > #ifdef ENABLE_NLS
| > # include <libintl.h>
| > # define _(Text) gettext (Text)
| > #else
| > # undef  bindtextdomain
| > # define bindtextdomain(Domain, Directory)
| > # undef  textdomain
| > # define textdomain(Domain)
| > # undef  ngettext
| > # define ngettext(Singular, Plural, Number)   \
| >          ((Number == 1) ? Singular : Plural)
| > # define _(Text) Text
| > #endif
| > #define N_(Text) Text
| > 
| > to work properly.
| 
| You get all this in a single line through #include "libgettext.h",
| using the libgettext.h from gettext-0.10.40.

Hey!  That header is great!  Thanks for pointing this out.  Then
consider my suggestion is documenting it, and NEWSing it too.



reply via email to

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