dev/c/gettext_cmake/test/gettextex1.c

22 lines
443 B
C

#include <glib/gprintf.h>
#include <glib/gi18n.h>
#include <locale.h>
#define _(String) gettext (String)
#define GETTEXT_PACKAGE "gettextex1"
#define LOCALEDIR "./locale"
int main(void)
{
setlocale (LC_ALL, "");
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
//bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
g_printf (_("Hello World!"));
g_printf ("\n");
g_printf (_("Quit"));
return 0;
}