public static function InitializeTranslationEngine() { require_once __NARRO_INCLUDES__ . '/gettext_reader.class.php'; require_once __NARRO_INCLUDES__ . '/StreamReader.class.php'; if (QApplication::$User->UserId == NarroUser::ANONYMOUS_USER_ID) { QApplication::$LanguageCode = QApplication::$TargetLanguage->LanguageCode; } else { QApplication::$LanguageCode = QApplication::$User->GetPreferenceValueByName('Application language'); } define('__LOCALE_DIRECTORY__', __DOCROOT__ . __SUBDIRECTORY__ . '/locale/' . QApplication::$LanguageCode); QI18n::Initialize('NarroPoParser'); }