diff options
author | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-03-20 15:14:59 +0000 |
---|---|---|
committer | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-03-20 15:14:59 +0000 |
commit | 032dcc2bb3bc5e8a8817d504f4f42aa40d149f71 (patch) | |
tree | aaa22be06461800dec519cf6005b9e1d90640e53 /mp_msg.c | |
parent | 4e0092801c98033c0e89b4baae63db3012a6c7fb (diff) | |
download | mpv-032dcc2bb3bc5e8a8817d504f4f42aa40d149f71.tar.bz2 mpv-032dcc2bb3bc5e8a8817d504f4f42aa40d149f71.tar.xz |
splitted mp_msg_init and mp_msg_set_level and added i18n support to init
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5221 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mp_msg.c')
-rw-r--r-- | mp_msg.c | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -16,7 +16,21 @@ static int mp_msg_levels[MSGT_MAX]; // verbose level of this module #if 1 -void mp_msg_init(int verbose){ +void mp_msg_init(){ +#ifdef USE_I18N + fprintf(stdout, "Using GNU internationalization\n"); + fprintf(stdout, "Original domain: %s\n", textdomain(NULL)); + fprintf(stdout, "Original dirname: %s\n", bindtextdomain(textdomain(NULL),NULL)); + setlocale(LC_ALL, ""); /* set from the environment variables */ + bindtextdomain("mplayer", PREFIX"/share/locale"); + textdomain("mplayer"); + fprintf(stdout, "Current domain: %s\n", textdomain(NULL)); + fprintf(stdout, "Current dirname: %s\n", bindtextdomain(textdomain(NULL),NULL)); +#endif + mp_msg_set_level(MSGL_STATUS); +} + +void mp_msg_set_level(int verbose){ int i; for(i=0;i<MSGT_MAX;i++){ mp_msg_levels[i]=verbose; |