aboutsummaryrefslogtreecommitdiff
path: root/libdino/src
diff options
context:
space:
mode:
Diffstat (limited to 'libdino/src')
-rw-r--r--libdino/src/dino_i18n.h3
-rw-r--r--libdino/src/util.vala3
2 files changed, 5 insertions, 1 deletions
diff --git a/libdino/src/dino_i18n.h b/libdino/src/dino_i18n.h
index e1a65f41..bf6e1347 100644
--- a/libdino/src/dino_i18n.h
+++ b/libdino/src/dino_i18n.h
@@ -3,6 +3,7 @@
#include<libintl.h>
-#define dino_gettext(String) ((char *) dgettext (GETTEXT_PACKAGE, String))
+#define dino_gettext(MsgId) ((char *) dgettext (GETTEXT_PACKAGE, MsgId))
+#define dino_ngettext(MsgId, MsgIdPlural, Int) ((char *) dngettext (GETTEXT_PACKAGE, MsgId, MsgIdPlural, Int))
#endif \ No newline at end of file
diff --git a/libdino/src/util.vala b/libdino/src/util.vala
index 29186aa0..03d6ee26 100644
--- a/libdino/src/util.vala
+++ b/libdino/src/util.vala
@@ -23,6 +23,9 @@ public class SearchPathGenerator {
[CCode (cname = "dino_gettext", cheader_filename = "dino_i18n.h")]
public static extern unowned string _(string s);
+[CCode (cname = "dino_ngettext", cheader_filename = "dino_i18n.h")]
+public static extern unowned string n(string msgid, string plural, ulong number);
+
[CCode (cname = "bindtextdomain", cheader_filename = "libintl.h")]
private static extern unowned string? bindtextdomain(string domainname, string? dirname);