Index: trunk/phase3/includes/Parser.php |
— | — | @@ -2249,6 +2249,9 @@ |
2250 | 2250 | return $wgScriptPath; |
2251 | 2251 | case MAG_DIRECTIONMARK: |
2252 | 2252 | return $wgContLang->getDirMark(); |
| 2253 | + case MAG_CONTENTLANGUAGE: |
| 2254 | + global $wgContLanguageCode; |
| 2255 | + return $wgContLanguageCode; |
2253 | 2256 | default: |
2254 | 2257 | $ret = null; |
2255 | 2258 | if ( wfRunHooks( 'ParserGetVariableValueSwitch', array( &$this, &$varCache, &$index, &$ret ) ) ) |
Index: trunk/phase3/includes/MagicWord.php |
— | — | @@ -92,6 +92,7 @@ |
93 | 93 | 'MAG_CURRENTTIMESTAMP', |
94 | 94 | 'MAG_DIRECTIONMARK', |
95 | 95 | 'MAG_LANGUAGE', |
| 96 | + 'MAG_CONTENTLANGUAGE', |
96 | 97 | ); |
97 | 98 | if ( ! defined( 'MEDIAWIKI_INSTALL' ) ) |
98 | 99 | wfRunHooks( 'MagicWordMagicWords', array( &$magicWords ) ); |
— | — | @@ -146,6 +147,7 @@ |
147 | 148 | MAG_CURRENTTIMESTAMP, |
148 | 149 | MAG_DIRECTIONMARK, |
149 | 150 | MAG_LANGUAGE, |
| 151 | + MAG_CONTENTLANGUAGE, |
150 | 152 | ); |
151 | 153 | if ( ! defined( 'MEDIAWIKI_INSTALL' ) ) |
152 | 154 | wfRunHooks( 'MagicWordwgVariableIDs', array( &$wgVariableIDs ) ); |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -459,6 +459,7 @@ |
460 | 460 | * (bug 6230) Regression fix: <nowiki> in [URL link text] |
461 | 461 | * Added AutoLoader.php, which loads classes without need of require_once() |
462 | 462 | * (bug 5981) Add plural function Slovenian (sl) |
| 463 | +* (bug 5945) Introduce {{CONTENTLANGUAGE}} magic word |
463 | 464 | |
464 | 465 | == Compatibility == |
465 | 466 | |
Index: trunk/phase3/languages/Language.php |
— | — | @@ -290,6 +290,7 @@ |
291 | 291 | MAG_CURRENTTIMESTAMP => array( 1, 'CURRENTTIMESTAMP' ), |
292 | 292 | MAG_DIRECTIONMARK => array( 1, 'DIRECTIONMARK', 'DIRMARK' ), |
293 | 293 | MAG_LANGUAGE => array( 0, '#LANGUAGE:' ), |
| 294 | + MAG_CONTENTLANGUAGE => array( 1, 'CONTENTLANGUAGE', 'CONTENTLANG' ), |
294 | 295 | ); |
295 | 296 | |
296 | 297 | if (!$wgCachedMessageArrays) { |