X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=inc%2Flanguage.php;h=b4735458f3f7ee8a2eb337a5a2f37d619fcd9747;hp=7f63099c00b277fe319d48e24b60515d92479962;hb=49f84a522f0ccac3b70728cd41011a0be0eed8cf;hpb=b66bceda2b37dcf421e4d8f5bc007c8b7f7863c7 diff --git a/inc/language.php b/inc/language.php index 7f63099c..b4735458 100644 --- a/inc/language.php +++ b/inc/language.php @@ -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( - $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]