Go to the documentation of this file.
9 protected function setUp() {
14 'wgLanguageCode' =>
'tg',
15 'wgDefaultLanguageVariant' =>
false,
24 array(
'tg',
'tg-latn' )
39 $this->assertEquals(
'tg', $this->lc->getPreferredVariant() );
48 $wgRequest->setHeader(
'Accept-Language',
'tg-latn' );
50 $this->assertEquals(
'tg-latn', $this->lc->getPreferredVariant() );
59 $wgRequest->setHeader(
'Accept-Language',
'tg;q=1' );
61 $this->assertEquals(
'tg', $this->lc->getPreferredVariant() );
70 $wgRequest->setHeader(
'Accept-Language',
'tg-latn;q=1' );
72 $this->assertEquals(
'tg-latn', $this->lc->getPreferredVariant() );
81 $wgRequest->setHeader(
'Accept-Language',
'en, tg-latn;q=1' );
83 $this->assertEquals(
'tg-latn', $this->lc->getPreferredVariant() );
97 $wgUser->setOption(
'variant',
'tg-latn' );
99 $this->assertEquals(
'tg-latn', $this->lc->getPreferredVariant() );
114 $wgUser->mOptionsLoaded =
true;
115 $wgUser->setOption(
'variant-tg',
'tg-latn' );
117 $this->assertEquals(
'tg-latn', $this->lc->getPreferredVariant() );
129 $wgRequest->setVal(
'variant',
'tg' );
133 $wgUser->mOptionsLoaded =
true;
135 $wgUser->setOption(
'variant',
'tg-latn' );
136 $this->assertEquals(
'tg', $this->lc->getPreferredVariant() );
143 global $wgDefaultLanguageVariant;
145 $wgDefaultLanguageVariant =
'tg-latn';
146 $this->assertEquals(
'tg-latn', $this->lc->getPreferredVariant() );
157 $wgDefaultLanguageVariant =
'tg';
158 $wgRequest->setVal(
'variant',
null );
159 $this->assertEquals(
'tg', $this->lc->getPreferredVariant() );
174 $this->mTables =
array(
183 parent::__construct();
184 $variants =
array(
'tg',
'tg-latn' );
185 $this->mConverter =
new TestConverter( $this,
'tg', $variants );
WebRequest clone which takes values from a provided array.
static newFromId( $id)
Static factory method for creation from a given user ID.
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
A BagOStuff object with no objects in it.
testGetPreferredVariantDefaults()
@covers LanguageConverter::getPreferredVariant
testGetPreferredVariantUserOptionForForeignLanguage()
@covers LanguageConverter::getPreferredVariant @covers LanguageConverter::getUserVariant
this class mediates it Skin Encapsulates a look and feel for the wiki All of the functions that render HTML and make choices about how to render it are here and are called from various other places when and is meant to be subclassed with other skins that may override some of its functions The User object contains a reference to a and so rather than having a global skin object we just rely on the global User and get the skin with $wgUser and also has some character encoding functions and other locale stuff The current user interface language is instantiated as and the content language as $wgContLang
testGetPreferredVariantHeaderWeight2()
@covers LanguageConverter::getPreferredVariant @covers LanguageConverter::getHeaderVariant
testGetPreferredVariantUserOption()
@covers LanguageConverter::getPreferredVariant
Test converter (from Tajiki to latin orthography)
deferred txt A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user For updating the view updating the linked to tables after a etc PHP does not yet have any way to tell the server to actually return and disconnect while still running these but it might have such a feature in the future We handle these by creating a deferred update object and putting those objects on a global then executing the whole list after the page is displayed We don t do anything smart like collating updates to the same table or such because the list is almost always going to have just one item on if so it s not worth the trouble Since there is a job queue in the jobs table
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
when a variable name is used in a it is silently declared as a new masking the global
Replacement array for FSS with fallback to strtr() Supports lazy initialisation of FSS resource.
testGetPreferredVariantDefaultLanguageVsUrlVariant()
@covers LanguageConverter::getPreferredVariant @covers LanguageConverter::getURLVariant
testGetPreferredVariantHeaderUserVsUrl()
@covers LanguageConverter::getPreferredVariant @covers LanguageConverter::getUserVariant @covers Lang...
testGetPreferredVariantDefaultLanguageVariant()
@covers LanguageConverter::getPreferredVariant
testGetPreferredVariantHeaders()
@covers LanguageConverter::getPreferredVariant @covers LanguageConverter::getHeaderVariant
static factory( $code)
Get a cached or new language object for a given language code.
testGetPreferredVariantHeaderWeight()
@covers LanguageConverter::getPreferredVariant @covers LanguageConverter::getHeaderVariant
testGetPreferredVariantHeaderMulti()
@covers LanguageConverter::getPreferredVariant @covers LanguageConverter::getHeaderVariant
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
Internationalisation code.