$langInstance->initLanguageStrings();
// Set language code from default config
- $langInstance->setLanguageCode(FrameworkConfiguration::getInstance()->readConfig("default_lang"));
+ $langInstance->setLanguageCode(FrameworkConfiguration::getInstance()->readConfig('default_lang'));
// Remember this instance
self::$thisInstance = $langInstance;
public final function getLanguageCode () {
return $this->langCode;
}
+
+ /**
+ * Get the plain message from the cache variable for the given message id
+ *
+ * @param $messageId The message id we shall find in the cache variable
+ * @return $messageText The plain message text
+ */
+ public function getMessage ($messageId) {
+ // Default is missing message text
+ $messageText = sprintf("!%s!",
+ $messageId
+ );
+
+ // Try to look it up in the cache variable
+ if ($this->langStrings->offsetExists($messageId)) {
+ // Return the message string
+ $messageText = $this->langStrings->offsetGet($messageId);
+ }
+
+ // Return the text
+ return $messageText;
+ }
}
// [EOF]