include: [nls.h] define a macro for handling plurals with ngettext()

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
This commit is contained in:
Benno Schulenberg 2011-07-30 19:20:58 +02:00 committed by Karel Zak
parent 340b3b0a68
commit 27cc25474f
1 changed files with 2 additions and 0 deletions

View File

@ -22,6 +22,7 @@ int main(int argc, char *argv[]);
# else
# define N_(String) (String)
# endif
# define P_(Singular, Plural, n) ngettext (Singular, Plural, n)
#else
# undef bindtextdomain
# define bindtextdomain(Domain, Directory) /* empty */
@ -29,6 +30,7 @@ int main(int argc, char *argv[]);
# define textdomain(Domain) /* empty */
# define _(Text) (Text)
# define N_(Text) (Text)
# define P_(Singular, Plural, n) ((n) == 1 ? (Singular) : (Plural))
#endif
#ifdef HAVE_LANGINFO_H