Copyright upgraded to 2010
[core.git] / inc / language.php
index 7f63099c00b277fe319d48e24b60515d92479962..2ace277e98097dbc819decca32b3e108a33b3d2e 100644 (file)
@@ -4,8 +4,10 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007 - 2009 Roland Haeder, this is free software
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009, 2010 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
+ * @deprecated
+ * @todo               We should minimize these includes
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * You should have received a copy of the GNU General Public License
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
-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: <span class=\"exception_reason\">%s</span>",
-               $e->getMessage()
-       ));
-} catch (InvalidLanguagePathStringException $e) {
-       ApplicationEntryPoint::app_die(sprintf("[Main:] The language sub-system could not be initialized for the following reason: <span class=\"exception_reason\">%s</span>",
-               $e->getMessage()
-       ));
-} catch (LanguagePathIsNoDirectoryException $e) {
-       ApplicationEntryPoint::app_die(sprintf("[Main:] The language sub-system could not be initialized for the following reason: <span class=\"exception_reason\">%s</span>",
-               $e->getMessage()
-       ));
-} catch (LanguagePathReadProtectedException $e) {
-       ApplicationEntryPoint::app_die(sprintf("[Main:] The language sub-system could not be initialized for the following reason: <span class=\"exception_reason\">%s</span>",
-               $e->getMessage()
-       ));
-}
+
+// Try to instance the language system
+$lang = LanguageSystem::createLanguageSystem(
+       FrameworkConfiguration::getInstance()->getConfigEntry('base_path').
+       FrameworkConfiguration::getInstance()->getConfigEntry('lang_base_path')
+);
 
 // Is the app variable there and valid?
+// @TODO Rewrite this
 if (is_object($app)) $app->setLanguageInstance($lang);
 
 // [EOF]