From: Cedric Duval Date: Fri, 23 Sep 2005 21:34:39 +0000 (+0000) Subject: Added gettext.c X-Git-Tag: upstream/0.6.1~2^2~159 X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;h=202b50261ebbb644662c4cca4b04c437dc97e420;p=pkg%2Fabook.git Added gettext.c (needed for sgettext() support) --- diff --git a/gettext.c b/gettext.c new file mode 100644 index 0000000..949e843 --- /dev/null +++ b/gettext.c @@ -0,0 +1,19 @@ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#ifdef ENABLE_NLS +#include +#include "gettext.h" + +char * +sgettext(const char *msgid) +{ + char *msgval = gettext(msgid); + + if(msgval == msgid) + msgval = strrchr(msgid, '|') + 1; + + return msgval; +} +#endif