Rewritten a lot double-quotes to single-requotes, removed deprecated exception, some...
[core.git] / inc / language.php
index 8fe75091b0cb12b8cf73357debfffda7fa867242..b4735458f3f7ee8a2eb337a5a2f37d619fcd9747 100644 (file)
  * 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(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: <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()->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]