mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Make gettext optional
This commit is contained in:
parent
89b8b792c1
commit
89af509d10
2 changed files with 48 additions and 27 deletions
|
@ -1,9 +1,16 @@
|
|||
#ifdef USE_GETTEXT
|
||||
#include <libintl.h>
|
||||
#else
|
||||
#define gettext(String) String
|
||||
#define bindtextdomain(domain, dir) /* */
|
||||
#define textdomain(domain) /* */
|
||||
#endif
|
||||
|
||||
#define _(String) gettext(String)
|
||||
#define gettext_noop(String) String
|
||||
#define N_(String) gettext_noop (String)
|
||||
|
||||
inline wchar_t* chartowchar_t(char *str)
|
||||
inline wchar_t* chartowchar_t(const char *str)
|
||||
{
|
||||
size_t l = strlen(str)+1;
|
||||
wchar_t* nstr = new wchar_t[l];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue