2001-01-16 03:24:24 +01:00
|
|
|
#ifndef __GLIBINTL_H__
|
|
|
|
#define __GLIBINTL_H__
|
|
|
|
|
2002-02-18 00:28:43 +01:00
|
|
|
#ifndef SIZEOF_CHAR
|
|
|
|
#error "config.h must be included prior to glibintl.h"
|
|
|
|
#endif
|
2001-01-16 03:24:24 +01:00
|
|
|
|
2011-03-13 03:50:45 +01:00
|
|
|
const gchar * glib_gettext (const gchar *str) G_GNUC_FORMAT(1);
|
|
|
|
const gchar * glib_pgettext (const gchar *msgctxtid,
|
|
|
|
gsize msgidoffset) G_GNUC_FORMAT(1);
|
2001-01-16 03:24:24 +01:00
|
|
|
|
2007-11-28 15:35:14 +01:00
|
|
|
#ifdef ENABLE_NLS
|
2001-01-16 03:24:24 +01:00
|
|
|
|
2001-01-17 05:31:20 +01:00
|
|
|
#include <libintl.h>
|
2007-11-26 17:12:50 +01:00
|
|
|
#define _(String) glib_gettext(String)
|
|
|
|
/* Split out this in the code, but keep it in the same domain for now */
|
|
|
|
#define P_(String) glib_gettext(String)
|
2011-03-13 02:48:31 +01:00
|
|
|
#define C_(Context,String) glib_pgettext (Context "\004" String, strlen (Context) + 1)
|
2001-01-16 03:24:24 +01:00
|
|
|
|
|
|
|
#ifdef gettext_noop
|
|
|
|
#define N_(String) gettext_noop(String)
|
|
|
|
#else
|
|
|
|
#define N_(String) (String)
|
|
|
|
#endif
|
|
|
|
#else /* NLS is disabled */
|
|
|
|
#define _(String) (String)
|
|
|
|
#define N_(String) (String)
|
2007-11-26 17:12:50 +01:00
|
|
|
#define P_(String) (String)
|
2010-08-24 23:47:02 +02:00
|
|
|
#define C_(Context,String) (String)
|
2009-01-18 02:08:17 +01:00
|
|
|
#define textdomain(String) ((String) ? (String) : "messages")
|
2001-01-16 03:24:24 +01:00
|
|
|
#define gettext(String) (String)
|
|
|
|
#define dgettext(Domain,String) (String)
|
|
|
|
#define dcgettext(Domain,String,Type) (String)
|
2008-03-31 05:52:57 +02:00
|
|
|
#define dngettext(Domain,String1,String2,N) ((N) == 1 ? (String1) : (String2))
|
2001-01-16 03:24:24 +01:00
|
|
|
#define bindtextdomain(Domain,Directory) (Domain)
|
2008-11-28 07:24:51 +01:00
|
|
|
#define bind_textdomain_codeset(Domain,Codeset)
|
2001-01-16 03:24:24 +01:00
|
|
|
#endif
|
|
|
|
|
2007-11-26 17:12:50 +01:00
|
|
|
/* not really I18N-related, but also a string marker macro */
|
|
|
|
#define I_(string) g_intern_static_string (string)
|
|
|
|
|
2001-01-16 03:24:24 +01:00
|
|
|
#endif /* __GLIBINTL_H__ */
|