From 64cdd7bf341f7c017e7747cc782355ca918f1016 Mon Sep 17 00:00:00 2001 From: Rotem Liss Date: Sat, 6 Jan 2007 18:29:53 +0000 Subject: [PATCH] Adding MessageCache::addMessagesByLang for localised extensions. Please do not use it for now, for backwards compatibility. --- includes/MessageCache.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 * -- 2.20.1