gettext

#include <stdio.h>
#include <string.h>
//#include <clocale>
#include "libintl.h"

#pragma comment(lib,"libintl.lib")
int main(int argc, char* argv[])
{
    printf("%s\n", setlocale(LC_ALL,"English"));
    printf("%s\n", bindtextdomain("messages", "C:\\gettext\\bin\\language"));
    printf("%s\n", textdomain("messages"));
    printf(gettext("hello"));
    return 0;
}

posted @ 2013-11-30 17:38  中国男孩  阅读(326)  评论(0编辑  收藏  举报