From dc37af350742e6d4bff61b5a32e01f62f55ee04d Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Wed, 18 Jan 2012 17:43:08 +0000 Subject: [PATCH] Update documentation as LanguageGetMagic hook is deprecated. --- includes/MagicWord.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/includes/MagicWord.php b/includes/MagicWord.php index 563d3a5621..8559ddadda 100644 --- a/includes/MagicWord.php +++ b/includes/MagicWord.php @@ -20,8 +20,19 @@ * Please avoid reading the data out of one of these objects and then writing * special case code. If possible, add another match()-like function here. * - * To add magic words in an extension, use the LanguageGetMagic hook. For - * magic words which are also Parser variables, add a MagicWordwgVariableIDs + * To add magic words in an extension, use $magicWords in a file listed in + * $wgExtensionMessagesFiles[]. + * + * Example: + * + * $magicWords = array(); + * + * $magicWords['en'] = array( + * 'magicwordkey' => array( 0, 'case_insensitive_magic_word' ), + * 'magicwordkey2' => array( 1, 'CASE_sensitive_magic_word2' ), + * ); + * + * For magic words which are also Parser variables, add a MagicWordwgVariableIDs * hook. Use string keys. * * @ingroup Parser -- 2.20.1