X-Git-Url: https://git.mxchange.org/?p=shipsimu.git;a=blobdiff_plain;f=inc%2Flanguage.php;h=fe8847a3cb3bbd09633d347d5a3aad2b3689867b;hp=60c9e28ebc9bbc667a4d4796a5bbe57a74737088;hb=df33e264f3246f80756d7e2da55d7f7c40f9088c;hpb=b226bbefe6bc09bcd75432c3c3ba32bf7da45b71 diff --git a/inc/language.php b/inc/language.php index 60c9e28..fe8847a 100644 --- a/inc/language.php +++ b/inc/language.php @@ -2,9 +2,9 @@ /** * Try to initializes the language system * - * @author Roland Haeder + * @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, this is free software * @license GNU GPL 3.0 or any newer version * * This program is free software: you can redistribute it and/or modify @@ -22,26 +22,29 @@ */ try { $lang = LanguageSystem::createLanguageSystem(sprintf("%s%s", - PATH, + $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", + 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", + 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", + 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", + ApplicationEntryPoint::app_die(sprintf("[Main:] The language sub-system could not be initialized for the following reason: %s", $e->getMessage() )); } +// Is the app variable there and valid? +if (is_object($app)) $app->setLanguageInstance($lang); + // [EOF] ?>