MediaWiki
REL1_35
LanguageConverterSpecific.php
Go to the documentation of this file.
1
<?php
26
abstract
class
LanguageConverterSpecific
extends
LanguageConverter
{
37
public
function
findVariantLink
( &$link, &$nt, $ignoreOtherCond =
false
) {
38
// check for user namespace
39
if
( is_object( $nt ) ) {
40
$ns = $nt->getNamespace();
41
if
( $ns ==
NS_USER
|| $ns ==
NS_USER_TALK
) {
42
return
;
43
}
44
}
45
46
$oldlink = $link;
47
parent::findVariantLink( $link, $nt, $ignoreOtherCond );
48
if
( $this->
getPreferredVariant
() == $this->mMainLanguageCode ) {
49
$link = $oldlink;
50
}
51
}
52
}
LanguageConverterSpecific
A class that extends LanguageConverter with specific behaviour.
Definition
LanguageConverterSpecific.php:26
LanguageConverterSpecific\findVariantLink
findVariantLink(&$link, &$nt, $ignoreOtherCond=false)
A function wrapper:
Definition
LanguageConverterSpecific.php:37
LanguageConverter
Base class for multi-variant language conversion.
Definition
LanguageConverter.php:35
LanguageConverter\getPreferredVariant
getPreferredVariant()
Get preferred language variant.
Definition
LanguageConverter.php:190
NS_USER
const NS_USER
Definition
Defines.php:72
NS_USER_TALK
const NS_USER_TALK
Definition
Defines.php:73
languages
LanguageConverterSpecific.php
Generated on Sat Apr 6 2024 00:08:10 for MediaWiki by
1.9.8