]> git.deb.at Git - pkg/abook.git/blobdiff - gettext.c
Imported Upstream version 0.5.5
[pkg/abook.git] / gettext.c
diff --git a/gettext.c b/gettext.c
new file mode 100644 (file)
index 0000000..949e843
--- /dev/null
+++ b/gettext.c
@@ -0,0 +1,19 @@
+#ifdef HAVE_CONFIG_H
+#      include "config.h"
+#endif
+
+#ifdef ENABLE_NLS
+#include <string.h>
+#include "gettext.h"
+
+char *
+sgettext(const char *msgid)
+{
+       char *msgval = gettext(msgid);
+
+       if(msgval == msgid)
+               msgval = strrchr(msgid, '|') + 1;
+
+       return msgval;
+}
+#endif