Index: trunk/phase3/includes/MagicWord.php |
— | — | @@ -20,8 +20,19 @@ |
21 | 21 | * Please avoid reading the data out of one of these objects and then writing |
22 | 22 | * special case code. If possible, add another match()-like function here. |
23 | 23 | * |
24 | | - * To add magic words in an extension, use the LanguageGetMagic hook. For |
25 | | - * magic words which are also Parser variables, add a MagicWordwgVariableIDs |
| 24 | + * To add magic words in an extension, use $magicWords in a file listed in |
| 25 | + * $wgExtensionMessagesFiles[]. |
| 26 | + * |
| 27 | + * Example: |
| 28 | + * |
| 29 | + * $magicWords = array(); |
| 30 | + * |
| 31 | + * $magicWords['en'] = array( |
| 32 | + * 'magicwordkey' => array( 0, 'case_insensitive_magic_word' ), |
| 33 | + * 'magicwordkey2' => array( 1, 'CASE_sensitive_magic_word2' ), |
| 34 | + * ); |
| 35 | + * |
| 36 | + * For magic words which are also Parser variables, add a MagicWordwgVariableIDs |
26 | 37 | * hook. Use string keys. |
27 | 38 | * |
28 | 39 | * @ingroup Parser |