diff --git a/lib/common.php b/lib/common.php index 1ab1672..1925ab1 100644 --- a/lib/common.php +++ b/lib/common.php @@ -259,15 +259,16 @@ if ($app['language'] == 'auto') { if ((substr($lang,0,2) == 'en') || (file_exists($app['language_dir']) && is_readable($app['language_dir']))) { - - # Set language - putenv('LANG='.$lang); # e.g. LANG=de_DE - $lang .= '.UTF-8'; - setlocale(LC_ALL,$lang); # set LC_ALL to de_DE - bindtextdomain('messages',LANGDIR); - bind_textdomain_codeset('messages','UTF-8'); - textdomain('messages'); - header('Content-type: text/html; charset=UTF-8',true); + if (extension_loaded('gettext')) { + # Set language + putenv('LANG='.$lang); # e.g. LANG=de_DE + $lang .= '.UTF-8'; + setlocale(LC_ALL,$lang); # set LC_ALL to de_DE + bindtextdomain('messages',LANGDIR); + bind_textdomain_codeset('messages','UTF-8'); + textdomain('messages'); + header('Content-type: text/html; charset=UTF-8',true); + } break; } } diff --git a/lib/page.php b/lib/page.php index fef5377..43efc2a 100644 --- a/lib/page.php +++ b/lib/page.php @@ -376,7 +376,7 @@ class page { 'FOOT'=>true ); - if ($_SESSION[APPCONFIG]->getValue('appearance','minimalMode')) { + if (isset($_SESSION) && $_SESSION[APPCONFIG]->getValue('appearance','minimalMode')) { $display = array( 'HEAD'=>false, 'CONTROL'=>false,