diff options
Diffstat (limited to 'source/blender/blenfont/intern/blf.c')
-rw-r--r-- | source/blender/blenfont/intern/blf.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c index fc812d652b3..9ec9dd1caa0 100644 --- a/source/blender/blenfont/intern/blf.c +++ b/source/blender/blenfont/intern/blf.c @@ -34,6 +34,11 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> + +#ifdef INTERNATIONAL +#include <libintl.h> +#endif + #include <math.h> #include <ft2build.h> @@ -299,6 +304,17 @@ void BLF_enable(int fontid, int option) font->flags |= option; } +const char* BLF_gettext(const char *msgid) +{ +#ifdef INTERNATIONAL + if( msgid!=NULL && strlen(msgid)>0 ) + return gettext( msgid ); + return ""; +#else + return msgid; +#endif +} + void BLF_disable(int fontid, int option) { FontBLF *font; |