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

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

Documentation of ngettext


From: Akim Demaille
Subject: Documentation of ngettext
Date: 12 Nov 2001 11:17:44 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Artificial Intelligence)

Hi!

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, the project really needs
something like:

#ifdef HAVE_LOCALE_H
# include <locale.h>
#endif
#ifndef HAVE_SETLOCALE
# define setlocale(Category, Locale)
#endif

#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.  Thanks for Gettext, it's really great.


(Oh, BTW, may I also suggest that the calling convention of
AM_GNU_GETTEXT be described with its arguments?  I had to look at the
m4 files to understand how to enable the checks for ngettext, I have
found this documented nowhere.  And why AM_?).



reply via email to

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