Index: trunk/phase3/languages/LanguageConverter.php |
— | — | @@ -125,7 +125,11 @@ |
126 | 126 | return $this->mPreferredVariant; |
127 | 127 | |
128 | 128 | // figure out user lang without constructing wgLang to avoid infinite recursion |
129 | | - $userLang = $wgRequest->getVal( 'uselang', $wgUser->getOption( 'language' ) ); |
| 129 | + if( $fromUser ) |
| 130 | + $defaultUserLang = $wgUser->getOption( 'language' ); |
| 131 | + else |
| 132 | + $defaultUserLang = $this->mMainLanguageCode; |
| 133 | + $userLang = $wgRequest->getVal( 'uselang', $defaultUserLang ); |
130 | 134 | // see if interface language is same as content, if not, prevent conversion |
131 | 135 | if( $this->mMainLanguageCode != $userLang ){ |
132 | 136 | $this->mPreferredVariant = $this->mMainLanguageCode; // no conversion |