Index: trunk/phase3/includes/StubObject.php |
— | — | @@ -147,7 +147,7 @@ |
148 | 148 | |
149 | 149 | // if variant is explicitely selected, use it instead the one from wgUser |
150 | 150 | // see bug #7605 |
151 | | - if( $wgContLang->hasVariants() ){ |
| 151 | + if( $wgContLang->hasVariants() && $code == $wgContLanguageCode ){ |
152 | 152 | $variant = $wgContLang->getPreferredVariant(); |
153 | 153 | if( $variant != $wgContLanguageCode ) |
154 | 154 | $code = $variant; |
Index: trunk/phase3/languages/LanguageConverter.php |
— | — | @@ -124,6 +124,14 @@ |
125 | 125 | if($this->mPreferredVariant) |
126 | 126 | return $this->mPreferredVariant; |
127 | 127 | |
| 128 | + // figure out user lang without constructing wgLang to avoid infinite recursion |
| 129 | + $userLang = $wgRequest->getVal( 'uselang', $wgUser->getOption( 'language' ) ); |
| 130 | + // see if interface language is same as content, if not, prevent conversion |
| 131 | + if( $this->mMainLanguageCode != $userLang ){ |
| 132 | + $this->mPreferredVariant = $this->mMainLanguageCode; // no conversion |
| 133 | + return $this->mPreferredVariant; |
| 134 | + } |
| 135 | + |
128 | 136 | // see if the preference is set in the request |
129 | 137 | $req = $wgRequest->getText( 'variant' ); |
130 | 138 | if( in_array( $req, $this->mVariants ) ) { |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -432,6 +432,7 @@ |
433 | 433 | had stict standards issues with setFakeSlaveLag() and setFakeMaster(). |
434 | 434 | * (bug 451) Improve the phrase mappings of the Chinese converter arrays. |
435 | 435 | * (bug 12487) Rights log is not fully internationalized |
| 436 | +* (bug 10837) Language variants no longer override other languages than base |
436 | 437 | |
437 | 438 | === API changes in 1.13 === |
438 | 439 | |