apti18n.h.in 803 B

12345678910111213141516171819202122232425262728293031
  1. // -*- mode: cpp; mode: fold -*-
  2. // $Id: apti18n.h.in,v 1.6 2003/01/11 07:18:18 jgg Exp $
  3. /* Internationalization macros for apt. This header should be included last
  4. in each C file. */
  5. // Set by autoconf
  6. #undef USE_NLS
  7. #ifdef USE_NLS
  8. // apt will use the gettext implementation of the C library
  9. #include <libintl.h>
  10. #include <locale.h>
  11. # ifdef APT_DOMAIN
  12. # define _(x) dgettext(APT_DOMAIN,x)
  13. # define P_(msg,plural,n) dngettext(APT_DOMAIN,msg,plural,n)
  14. # else
  15. # define _(x) gettext(x)
  16. # define P_(msg,plural,n) ngettext(msg,plural,n)
  17. # endif
  18. # define N_(x) x
  19. #else
  20. // apt will not use any gettext
  21. # define setlocale(a, b)
  22. # define textdomain(a)
  23. # define bindtextdomain(a, b)
  24. # define _(x) x
  25. # define P_(msg,plural,n) (n == 1 ? msg : plural)
  26. # define N_(x) x
  27. # define dgettext(d, m) m
  28. #endif