From 032fff9adb2328428af123fe3948d79a51ab17b0 Mon Sep 17 00:00:00 2001 From: Gildas Bazin Date: Mon, 7 Apr 2003 13:46:06 +0000 Subject: [PATCH] * src/libvlc.c: fixed the translation config option to also take into account the value in the config file. --- src/libvlc.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/libvlc.c b/src/libvlc.c index 8f5e39ea2e..beb788158d 100644 --- a/src/libvlc.c +++ b/src/libvlc.c @@ -2,7 +2,7 @@ * libvlc.c: main libvlc source ***************************************************************************** * Copyright (C) 1998-2002 VideoLAN - * $Id: libvlc.c,v 1.74 2003/04/07 13:01:39 gbazin Exp $ + * $Id: libvlc.c,v 1.75 2003/04/07 13:46:06 gbazin Exp $ * * Authors: Vincent Seguin * Samuel Hocevar @@ -322,16 +322,22 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] ) } /* Check for translation config option */ -#ifndef SYS_DARWIN +#if defined( ENABLE_NLS ) \ + && ( defined( HAVE_GETTEXT ) || defined( HAVE_INCLUDED_GETTEXT ) ) + + /* This ain't really nice to have to reload the config here but it seems + * the only way to do it. */ + p_vlc->psz_homedir = config_GetHomeDir(); + config_LoadConfigFile( p_vlc, "main" ); + config_LoadCmdLine( p_vlc, &i_argc, ppsz_argv, VLC_TRUE ); + if( !config_GetInt( p_vlc, "translation" ) ) { /* Reset the default domain */ SetLanguage( "C" ); -#if defined( ENABLE_NLS ) \ - && ( defined( HAVE_GETTEXT ) || defined( HAVE_INCLUDED_GETTEXT ) ) textdomain( "dummy" ); -#endif + module_EndBank( p_vlc ); module_InitBank( &libvlc ); module_LoadMain( &libvlc ); -- 2.39.2