Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef GETTEXT_HPP_INCLUDED
00017 #define GETTEXT_HPP_INCLUDED
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #include <libintl.h>
00040
00041 #ifdef setlocale
00042
00043 #undef setlocale
00044 #endif
00045
00046 const char* egettext(const char*);
00047 const char* sgettext(const char*);
00048 const char* dsgettext(const char * domainname, const char *msgid);
00049 const char* sngettext(const char *singular, const char *plural, int n);
00050 const char* dsngettext(const char * domainname, const char *singular, const char *plural, int n);
00051
00052
00053 #ifdef __CDT_PARSER__
00054 #define GETTEXT_DOMAIN ""
00055 #endif
00056
00057 #ifdef GETTEXT_DOMAIN
00058 # define _(String) dsgettext(GETTEXT_DOMAIN,String)
00059 # define _n(String1,String2,Int) dsngettext(String1,String2,Int)
00060 # ifdef gettext
00061 # undef gettext
00062 # endif
00063 # define gettext(String) dgettext(GETTEXT_DOMAIN,String)
00064 # define sgettext(String) dsgettext(GETTEXT_DOMAIN,String)
00065 # define sngettext(String1,String2,Int) dsngettext(GETTEXT_DOMAIN,String1,String2,Int)
00066 #else
00067 # define _(String) sgettext(String)
00068 # define _n(String1,String2,Int) sngettext(String1,String2,Int)
00069 #endif
00070
00071 #define gettext_noop(String) String
00072 #define N_(String) gettext_noop (String)
00073
00074 #endif