summaryrefslogtreecommitdiffstats
path: root/mp_msg.c
diff options
context:
space:
mode:
authoralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-03-20 15:14:59 +0000
committeralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-03-20 15:14:59 +0000
commit032dcc2bb3bc5e8a8817d504f4f42aa40d149f71 (patch)
treeaaa22be06461800dec519cf6005b9e1d90640e53 /mp_msg.c
parent4e0092801c98033c0e89b4baae63db3012a6c7fb (diff)
downloadmpv-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.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/mp_msg.c b/mp_msg.c
index 6be0d01e68..7ba3116a6b 100644
--- a/mp_msg.c
+++ b/mp_msg.c
@@ -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;