summaryrefslogtreecommitdiff
path: root/src/gettext.h
diff options
context:
space:
mode:
authorBlockMen <nmuelll@web.de>2013-08-03 17:57:51 +0200
committerPilzAdam <pilzadam@minetest.net>2013-08-04 20:49:23 +0200
commitbe4670fecfceabd6760153e9a5b4f9868614e573 (patch)
tree438c293d6e29002593fce92c5b48f7a5d08bfa9a /src/gettext.h
parent2af5864534c7615aeaff7e66c4dfb9618809c173 (diff)
downloadminetest-be4670fecfceabd6760153e9a5b4f9868614e573.tar.gz
minetest-be4670fecfceabd6760153e9a5b4f9868614e573.tar.bz2
minetest-be4670fecfceabd6760153e9a5b4f9868614e573.zip
Fix formspec label issues in win builds (MSVC)
Diffstat (limited to 'src/gettext.h')
-rw-r--r--src/gettext.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gettext.h b/src/gettext.h
index ca82b1f02..fd32e082f 100644
--- a/src/gettext.h
+++ b/src/gettext.h
@@ -83,5 +83,12 @@ inline void changeCtype(const char *l)
else
infostream<<"locale has been set to:"<<ret<<std::endl;*/
}
+
+inline std::wstring wstrgettext(std::string text) {
+ wchar_t* wlabel = wgettext(text.c_str());
+ std::wstring out = (std::wstring)wlabel;
+ delete[] wlabel;
+ return out;
+}
#define GETTEXT_HEADER
#endif