Last modified: 2014-08-02 19:08:28 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 15799 - Using $wgConf to set the LanguageCode doesn't take care of directionality
Using $wgConf to set the LanguageCode doesn't take care of directionality
Status: NEW
Product: MediaWiki
Classification: Unclassified
Internationalization (Other open bugs)
All All
: Low enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
Blocks: rtl
  Show dependency treegraph
Reported: 2008-10-01 19:23 UTC by Huji
Modified: 2014-08-02 19:08 UTC (History)
9 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description Huji 2008-10-01 19:23:54 UTC
In a wiki family, when these settings are used:

switch ($_SERVER["SERVER_NAME"])
	case "fa.localhost":
		$wgLanguageCode = "fa";
	case "en.localhost":
		$wgDBname           = "enwiki";

$wgLocalDatabases = array( 'enwiki','fawiki' );
$wgConf->wikis = $wgLocalDatabases;
$wgConf->suffixex = array( 'wiki' );
$wgConf->localVHosts = array( 'localhost' );
list( $site, $lang ) = $wgConf->siteFromDB( $wgDBname );
$params = array( 'site' => $site, 'lang' => $lang, 'wiki' => $wgDBname );
$wgConf->settings = array(
	'wgScriptPath' => array( 'default' => '/w' ),
	'wgArticlPath' => array( 'default' => '/wiki/$1' ),
	'wgSitename' => array( 'enwiki' => 'English Wiki', 'fawiki' => 'ویکی فارسی' ),
	'wgLanguageCode' => array( '$lang' ),
	'wgLocalInterwiki' => array( '$lang' ),
	'wgSecretKey' => array(
		'enwiki' => "ce352ddd112c5d9665cf7264f2a6a36b91aebc2242fd2f4ffcbb5a4cd0601590",
		'fawiki' => "5985cc63dbb366e3837cde1868e2f2cfdd6ea0b77bf95510686bc1f1822e4e40",

Both the Persian and the English wikis are rendered left-to-right. However, when $wgLanguageCode is set in the top section:

switch ($_SERVER["SERVER_NAME"])
	case "fa.localhost":
		$wgDBname           = "fawiki";
		$wgLanguageCode = "fa";
	case "en.localhost":
		$wgDBname           = "enwiki";
		$wgLanguageCode = "en";

the Persian wiki is correctly rendered RTL.

Note You need to log in before you can comment on or make changes to this bug.