]> git.mxchange.org Git - shipsimu.git/blobdiff - ship-simu/inc/language.php
Initial import of current development status
[shipsimu.git] / ship-simu / inc / language.php
diff --git a/ship-simu/inc/language.php b/ship-simu/inc/language.php
new file mode 100644 (file)
index 0000000..5d686f9
--- /dev/null
@@ -0,0 +1,29 @@
+<?php
+/**
+ * Try to initializes the language system
+ */
+try {
+       $lang = LanguageSystem::createLanguageSystem(sprintf("%s%s",
+               PATH,
+               FrameworkConfiguration::getInstance()->readConfig("lang_base_path")
+       ));
+} catch (LanguagePathIsEmptyException $e) {
+       ApplicationEntryPoint::app_die(sprintf("[Main:] Sprachsystem konnte nicht initialisiert werden. Reason: <strong>%s</strong>",
+               $e->getMessage()
+       ));
+} catch (InvalidLanguagePathStringException $e) {
+       ApplicationEntryPoint::app_die(sprintf("[Main:] Sprachsystem konnte nicht initialisiert werden. Reason: <strong>%s</strong>",
+               $e->getMessage()
+       ));
+} catch (LanguagePathIsNoDirectoryException $e) {
+       ApplicationEntryPoint::app_die(sprintf("[Main:] Sprachsystem konnte nicht initialisiert werden. Reason: <strong>%s</strong>",
+               $e->getMessage()
+       ));
+} catch (LanguagePathReadProtectedException $e) {
+       ApplicationEntryPoint::app_die(sprintf("[Main:] Sprachsystem konnte nicht initialisiert werden. Reason: <strong>%s</strong>",
+               $e->getMessage()
+       ));
+}
+
+// [EOF]
+?>