]> git.sesse.net Git - vlc/commitdiff
Do not provide a broken language option on Linux and similar OSes
authorRémi Denis-Courmont <rem@videolan.org>
Sat, 15 Apr 2006 14:18:13 +0000 (14:18 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Sat, 15 Apr 2006 14:18:13 +0000 (14:18 +0000)
where the user normally use LANG, LANGUAGE, etc to define his/her
language(s). It didn't work anyway (refs #638).

src/libvlc.c
src/libvlc.h

index 1cadf12ebec4c23adcadc910125bb0c5f76a12ff..bef0db4eabba3193b8be8fd6e19266920247b3ad 100644 (file)
@@ -458,7 +458,7 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] )
     /* Check for translation config option */
 #if defined( ENABLE_NLS ) \
      && ( defined( HAVE_GETTEXT ) || defined( HAVE_INCLUDED_GETTEXT ) )
-
+# if defined (WIN32) || defined (__APPLE__)
     /* This ain't really nice to have to reload the config here but it seems
      * the only way to do it. */
     config_LoadConfigFile( p_vlc, "main" );
@@ -473,13 +473,6 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] )
         /* Reset the default domain */
         SetLanguage( psz_language );
 
-        /* Should not be needed (otherwise, fixes should rather be
-         * attempted on vlc_current_charset().
-         * Also, if the locale charset is overriden, anything that has been
-         * translated until now would have to be retranslated. */
-        /*LocaleDeinit();
-        LocaleInit( (vlc_object_t *)p_vlc );*/
-
         /* Translate "C" to the language code: "fr", "en_GB", "nl", "ru"... */
         msg_Dbg( p_vlc, "translation test: code is \"%s\"", _("C") );
 
@@ -490,6 +483,7 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] )
         libvlc.p_module_bank->b_cache_delete = b_cache_delete;
     }
     if( psz_language ) free( psz_language );
+# endif
 #endif
 
     /*
index 12a707df0de1b9b6b355e7f1eaed2bde64f2f057..159b25c8c39bc6fa3bbc4c1af3c65b500a3dfd42 100644 (file)
@@ -1532,9 +1532,12 @@ vlc_module_begin();
                VLC_TRUE );
 #endif
 
+#if defined (WIN32) || defined (__APPLE__)
     add_string( "language", "auto", NULL, LANGUAGE_TEXT, LANGUAGE_LONGTEXT,
                 VLC_FALSE );
         change_string_list( ppsz_language, ppsz_language_text, 0 );
+#endif
+
     add_bool( "color", 0, NULL, COLOR_TEXT, COLOR_LONGTEXT, VLC_TRUE );
     add_bool( "advanced", 0, NULL, ADVANCED_TEXT, ADVANCED_LONGTEXT,
                     VLC_FALSE );