#include #include #include #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; }