Index: trunk/extensions/Seealso/Seealso.i18n.php |
— | — | @@ -0,0 +1,22 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Internationalisation file for extension Seealso. |
| 5 | + * |
| 6 | + * @addtogroup Extensions |
| 7 | +*/ |
| 8 | + |
| 9 | +$messages = array(); |
| 10 | + |
| 11 | +/** English |
| 12 | + * @author Magnus Manske |
| 13 | + */ |
| 14 | +$messages['en'] = array( |
| 15 | + 'seealso' => 'See also', |
| 16 | +); |
| 17 | + |
| 18 | +/** French (Français) |
| 19 | + * @author Bertrand GRONDIN |
| 20 | + */ |
| 21 | +$messages['fr'] = array( |
| 22 | + 'seealso' => 'Voir aussi', |
| 23 | +); |
Property changes on: trunk/extensions/Seealso/Seealso.i18n.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 24 | + native |
Index: trunk/extensions/Seealso/Seealso.php |
— | — | @@ -11,20 +11,30 @@ |
12 | 12 | Set system message "seealso_local" to use a localized version, e.g., to "sieheauch" |
13 | 13 | */ |
14 | 14 | |
| 15 | +$wgExtensionCredits['parserhook'][] = array( |
| 16 | + 'name' => 'Seealso', |
| 17 | + 'url' => 'http://www.mediawiki.org/wiki/Extension:See_also', |
| 18 | + 'author' => 'Magnus Manske', |
| 19 | + 'description' => 'Localised \'See also\' headings using the tag <nowiki><seealso></nowiki>', |
| 20 | +); |
15 | 21 | |
16 | 22 | $wgExtensionFunctions[] = "wfSeealso"; |
17 | 23 | |
| 24 | +$dir = dirname(__FILE__) . '/'; |
| 25 | +$wgExtensionMessagesFiles['seealso'] = $dir . 'Seealso.i18n.php'; |
| 26 | + |
18 | 27 | function wfSeealso () { |
| 28 | + wfLoadExtensionMessages( 'seealso' ); |
19 | 29 | global $wgParser ; |
20 | | - $wgParser->setHook ( "seealso" , 'parse_seealso' ) ; |
21 | | - $l = trim ( wfMsg ( "seealso_local" , "" ) ) ; |
| 30 | + $wgParser->setHook ('seealso', 'parse_seealso' ) ; |
| 31 | + $l = trim ( 'seealso-local', "" ) ; |
22 | 32 | if ( $l != "" ) |
23 | | - $wgParser->setHook ( $l , 'parse_seealso' ) ; |
| 33 | + $wgParser->setHook ( $l , 'parse_seealso' ) ; |
24 | 34 | } |
25 | 35 | |
26 | 36 | function parse_seealso ( $text, $params, &$parser ) { |
27 | 37 | $a = explode ( "\n" , $text ) ; |
28 | | - $ret = "== " . trim ( wfMsg ( "seealso" ) ) . " ==\n" ; |
| 38 | + $ret = "== " . trim ( wfMsg('seealso')) . " ==\n" ; |
29 | 39 | foreach ( $a AS $x ) { |
30 | 40 | $x = trim ( $x ) ; |
31 | 41 | if ( $x == "" ) continue ; |
— | — | @@ -35,5 +45,3 @@ |
36 | 46 | $ret = $ret->getText(); |
37 | 47 | return $ret ; |
38 | 48 | } |
39 | | - |
40 | | - |