Mercurial > mplayer.hg
diff mp_msg.c @ 5220:4afbe13150e6
splitted mp_msg_init and mp_msg_set_level and added i18n support to init
author | alex |
---|---|
date | Wed, 20 Mar 2002 15:14:59 +0000 |
parents | 17f97ed8259e |
children | 30caf02c0eae |
line wrap: on
line diff
--- a/mp_msg.c Wed Mar 20 14:56:26 2002 +0000 +++ b/mp_msg.c Wed Mar 20 15:14:59 2002 +0000 @@ -16,7 +16,21 @@ #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;