class Language {
var $mConverter;
- function Language() {
+ function __construct() {
$this->mConverter = new fakeConverter($this);
}
* @return bool
*/
function isRTL() { return false; }
- function getDirMark() { return $this->isRTL() ? '‏' : '‎'; }
+
+ /**
+ * A hidden direction mark (LRM or RLM), depending on the language direction
+ *
+ * @return string
+ */
+ function getDirMark() { return $this->isRTL() ? "\xE2\x80\x8F" : "\xE2\x80\x8E"; }
/**
* To allow "foo[[bar]]" to extend the link over the whole word "foobar"
*/
function linkPrefixExtension() { return false; }
-
function &getMagicWords() {
global $wgMagicWordsEn;
return $wgMagicWordsEn;
function getMagic( &$mw ) {
$raw = $this->getMagicWords();
- wfRunHooks( 'LanguageGetMagic', array( &$raw ) );
+ wfRunHooks( 'LanguageGetMagic', array( &$raw, $this->getCode() ) );
if( !isset( $raw[$mw->mId] ) ) {
# Fall back to English if local list is incomplete