X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=inc%2Flanguage.php;h=627baabe4b4daf1e9251e8e3cc68cd70c62da280;hp=fe8847a3cb3bbd09633d347d5a3aad2b3689867b;hb=d0e54028694e7af87c6eed5ec26fc0d05174d500;hpb=c6d73b0e3246efc824cb98338d4be7ee5bc9f308 diff --git a/inc/language.php b/inc/language.php index fe8847a3..627baabe 100644 --- a/inc/language.php +++ b/inc/language.php @@ -4,7 +4,7 @@ * * @author Roland Haeder * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team * @license GNU GPL 3.0 or any newer version * * This program is free software: you can redistribute it and/or modify @@ -20,30 +20,15 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -try { - $lang = LanguageSystem::createLanguageSystem(sprintf("%s%s", - $cfg->readConfig('base_path'), - FrameworkConfiguration::getInstance()->readConfig('lang_base_path') - )); -} catch (LanguagePathIsEmptyException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:] The language sub-system could not be initialized for the following reason: %s", - $e->getMessage() - )); -} catch (InvalidLanguagePathStringException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:] The language sub-system could not be initialized for the following reason: %s", - $e->getMessage() - )); -} catch (LanguagePathIsNoDirectoryException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:] The language sub-system could not be initialized for the following reason: %s", - $e->getMessage() - )); -} catch (LanguagePathReadProtectedException $e) { - ApplicationEntryPoint::app_die(sprintf("[Main:] The language sub-system could not be initialized for the following reason: %s", - $e->getMessage() - )); -} + +// Try to instance the language system +$lang = LanguageSystem::createLanguageSystem( + FrameworkConfiguration::getInstance()->readConfig('base_path'). + FrameworkConfiguration::getInstance()->readConfig('lang_base_path') +); // Is the app variable there and valid? +// @TODO Rewrite this if (is_object($app)) $app->setLanguageInstance($lang); // [EOF]