From: Rotem Liss Date: Sat, 6 Jan 2007 18:29:53 +0000 (+0000) Subject: Adding MessageCache::addMessagesByLang for localised extensions. Please do not use... X-Git-Tag: 1.31.0-rc.0~54639 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/password.php?a=commitdiff_plain;h=64cdd7bf341f7c017e7747cc782355ca918f1016;p=lhc%2Fweb%2Fwiklou.git Adding MessageCache::addMessagesByLang for localised extensions. Please do not use it for now, for backwards compatibility. --- diff --git a/includes/MessageCache.php b/includes/MessageCache.php index fd79790371..830840bf6a 100644 --- a/includes/MessageCache.php +++ b/includes/MessageCache.php @@ -623,6 +623,20 @@ class MessageCache { wfProfileOut( __METHOD__ ); } + /** + * Add a 2-D array of messages by lang. Useful for extensions. + * Introduced in 1.9. Please do not use it for now, for backwards compatibility. + * + * @param array $messages The array to be added + */ + function addMessagesByLang( $messages ) { + wfProfileIn( __METHOD__ ); + foreach ( $messages as $key => $value ) { + $this->addMessages( $value, $key ); + } + wfProfileOut( __METHOD__ ); + } + /** * Get the extension messages for a specific language *