Use system-defined language as default in TDM

This resolves Bug 1596
pull/2/head
François Andriot 9 years ago committed by Slávek Banko
parent e790a33645
commit bd35f1efd6

@ -807,6 +807,10 @@ systemEnv( const char *user )
env = baseEnv( user );
if (td->authFile)
env = setEnv( env, "XAUTHORITY", td->authFile );
char *lang = getenv("LANG");
if (lang != NULL) {
env = setEnv( env, "LANG", lang );
}
env = setEnv( env, "PATH", td->systemPath );
env = setEnv( env, "SHELL", td->systemShell );
return env;

@ -779,7 +779,12 @@ main( int argc ATTR_UNUSED, char **argv )
LogPanic( "Cannot save $HOME\n" );
atexit( cleanup );
setenv( "LC_ALL", _language, 1 );
if ( getenv( "LANG" ) == NULL ) {
setenv( "LC_ALL", _language, 1 );
}
else {
setenv( "LC_ALL", getenv( "LANG" ), 1 );
}
kg_main( argv[0] );

Loading…
Cancel
Save