From 5537c5b85e01e8a2bcae4102d8406ad6fd316f60 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sat, 25 Sep 2004 10:38:34 +0000 Subject: [PATCH] Avoid gratuitously breaking configurations: continue to use $wgLanguageCode in LocalSettings.php, and pass that value on to $wgContLanguageCode internally. --- config/index.php | 2 +- includes/DefaultSettings.php | 2 +- includes/Setup.php | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/config/index.php b/config/index.php index 53e3064117..7565439c3b 100644 --- a/config/index.php +++ b/config/index.php @@ -885,7 +885,7 @@ if ( \$wgCommandLineMode ) { \$wgLocalInterwiki = \$wgSitename; -\$wgContLanguageCode = \"{$slconf['LanguageCode']}\"; +\$wgLanguageCode = \"{$slconf['LanguageCode']}\"; \$wgUseLatin1 = " . ($conf->Latin1 ? 'true' : 'false') . ";\n \$wgProxyKey = \"$proxyKey\"; diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index b68250a3f3..ce6fe0e3a1 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -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 diff --git a/includes/Setup.php b/includes/Setup.php index 792acd991c..983f15dfab 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -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 ); -- 2.20.1