]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/gettext.h
marked strings as translation
[dragonfireclient.git] / src / gettext.h
index b62421c78d908c148b43c62638045df0d65804cd..f2cb8e471953b4e64634f16c89a90d3b5a1ab860 100644 (file)
@@ -13,8 +13,8 @@
 
 inline void init_gettext(const char *path) {
 #if USE_GETTEXT
-       #if MSVC
-       #else
+       // don't do this if MSVC compiler is used, it gives an assertion fail
+       #ifndef _MSC_VER
                setlocale(LC_MESSAGES, "");
        #endif
        bindtextdomain(PROJECT_NAME, path);
@@ -30,6 +30,11 @@ inline wchar_t* chartowchar_t(const char *str)
        return nstr;
 }
 
+inline wchar_t* wgettext(const char *str)
+{
+       return chartowchar_t(gettext(str));
+}
+
 inline void changeCtype(const char *l)
 {
        char *ret = NULL;