intl.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /* i18n stuff for vips.
  2. */
  3. #ifndef VIPS_INTL_H
  4. #define VIPS_INTL_H
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif /*__cplusplus*/
  8. const char *vips__gettext( const char *msgid );
  9. const char *vips__ngettext( const char *msgid,
  10. const char *plural, unsigned long int n );
  11. #ifdef ENABLE_NLS
  12. #include <libintl.h>
  13. #define _(String) vips__gettext(String)
  14. /* ngettext may be defined as a macro if we're optimised.
  15. */
  16. #ifdef ngettext
  17. #undef ngettext
  18. #endif /*ngettext*/
  19. #define ngettext(String,Plural,number) vips__ngettext(String,Plural,number)
  20. #ifdef gettext_noop
  21. #define N_(String) gettext_noop(String)
  22. #else
  23. #define N_(String) (String)
  24. #endif
  25. #else /*!ENABLE_NLS*/
  26. #define _(String) (String)
  27. #define N_(String) (String)
  28. #define textdomain(String) (String)
  29. #define gettext(String) (String)
  30. #define dgettext(Domain,String) (String)
  31. #define dcgettext(Domain,String,Type) (String)
  32. #define bindtextdomain(Domain,Directory) (Domain)
  33. #define bind_textdomain_codeset(Domain,Codeset) (Codeset)
  34. #define ngettext(S, P, N) ((N) == 1 ? (S) : (P))
  35. #define dngettext(D, S, P, N) ngettext(S, P, N)
  36. #endif /* ENABLE_NLS */
  37. #ifdef __cplusplus
  38. }
  39. #endif /*__cplusplus*/
  40. #endif /* VIPS_INTL_H */