aboutsummaryrefslogtreecommitdiffhomepage
path: root/translate.h
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-01-04 22:51:02 +1000
committerGravatar axel <axel@liljencrantz.se>2006-01-04 22:51:02 +1000
commitec43c635cc65145dc4c36b4b284b86119534533e (patch)
treef563bf720ab28d1269a0be9805a3fef4dbd6e05d /translate.h
parent26de6ba26b71f06c15ee7e8a54a7b52e0437047d (diff)
Add i18n through gettext, as well as a Swedish translation
darcs-hash:20060104125102-ac50b-5bf026578a69bd94f7a7a3c8dee0ebccd95e5c24.gz
Diffstat (limited to 'translate.h')
-rw-r--r--translate.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/translate.h b/translate.h
new file mode 100644
index 00000000..fb2c200f
--- /dev/null
+++ b/translate.h
@@ -0,0 +1,27 @@
+/** \file translate.h
+
+Translation library, internally uses catgets
+
+*/
+
+/**
+ Shorthand for wgettext call
+*/
+#define _(wstr) wgettext(wstr)
+
+/**
+ Noop, used to tell xgettext that a string should be translated, even though it is not directly sent to wgettext.
+*/
+#define N_(wstr) wstr
+
+/**
+ Wide character wwrapper around the gettext function
+*/
+const wchar_t *wgettext( const wchar_t *in );
+
+/**
+ Initialize (or reinitialize) the translation library
+ \param lang The two-character language name, such as 'de' or 'en'
+*/
+void translate_init();
+void translate_destroy();