libgettext.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* Convenience header for conditional use of GNU <libintl.h>.
  2. Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
  3. This program is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation; either version 2, or (at your option)
  6. any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program; if not, write to the Free Software Foundation,
  13. Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
  14. #ifndef _LIBGETTEXT_H
  15. #define _LIBGETTEXT_H 1
  16. /* NLS can be disabled through the configure --disable-nls option. */
  17. #if ENABLE_NLS
  18. /* Get declarations of GNU message catalog functions. */
  19. # include <libintl.h>
  20. #else
  21. # define gettext(Msgid) (Msgid)
  22. # define dgettext(Domainname, Msgid) (Msgid)
  23. # define dcgettext(Domainname, Msgid, Category) (Msgid)
  24. # define ngettext(Msgid1, Msgid2, N) \
  25. ((N) == 1 ? (char *) (Msgid1) : (char *) (Msgid2))
  26. # define dngettext(Domainname, Msgid1, Msgid2, N) \
  27. ((N) == 1 ? (char *) (Msgid1) : (char *) (Msgid2))
  28. # define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
  29. ((N) == 1 ? (char *) (Msgid1) : (char *) (Msgid2))
  30. # define textdomain(Domainname) ((char *) (Domainname))
  31. # define bindtextdomain(Domainname, Dirname) ((char *) (Dirname))
  32. # define bind_textdomain_codeset(Domainname, Codeset) ((char *) (Codeset))
  33. #endif
  34. /* For automatical extraction of messages sometimes no real
  35. translation is needed. Instead the string itself is the result. */
  36. #define gettext_noop(Str) (Str)
  37. #endif /* _LIBGETTEXT_H */