Avoid gratuitously breaking configurations: continue to use
authorBrion Vibber <brion@users.mediawiki.org>
Sat, 25 Sep 2004 10:38:34 +0000 (10:38 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sat, 25 Sep 2004 10:38:34 +0000 (10:38 +0000)
$wgLanguageCode in LocalSettings.php, and pass that value on
to $wgContLanguageCode internally.

config/index.php
includes/DefaultSettings.php
includes/Setup.php

index 53e3064..7565439 100644 (file)
@@ -885,7 +885,7 @@ if ( \$wgCommandLineMode ) {
 
 \$wgLocalInterwiki   = \$wgSitename;
 
-\$wgContLanguageCode = \"{$slconf['LanguageCode']}\";
+\$wgLanguageCode = \"{$slconf['LanguageCode']}\";
 \$wgUseLatin1 = " . ($conf->Latin1 ? 'true' : 'false') . ";\n
 
 \$wgProxyKey = \"$proxyKey\";
index b68250a..ce6fe0e 100644 (file)
@@ -260,7 +260,7 @@ $wgUseTurckShm      = false;
  * Default to 'en'. Should be one of ./language/Language(.*).php
  * @global string $wgLanguageCode
  */
-$wgContLanguageCode     = 'en';
+$wgLanguageCode     = 'en';
 
 /**
  * Filename of a language file generated by dumpMessages.php
index 792acd9..983f15d 100644 (file)
@@ -250,6 +250,10 @@ function setupLangObj(&$langclass, $langcode) {
 
 require_once( 'languages/Language.php' );
 
+# $wgLanguageCode may be changed later to fit with user preference.
+# The content language will remain fixed as per the configuration,
+# so let's keep it.
+$wgContLanguageCode = $wgLanguageCode;
 $wgContLangClass = 'Language' . str_replace( '-', '_', ucfirst( $wgContLanguageCode ) );
 
 $wgContLang = setupLangObj( $wgContLangClass, $wgContLangClass );