]> git.mxchange.org Git - mailer.git/blobdiff - inc/language.php
0.3.0 inital import
[mailer.git] / inc / language.php
diff --git a/inc/language.php b/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]
+?>