Index: trunk/phase3/languages/LanguageConverter.php |
— | — | @@ -242,9 +242,15 @@ |
243 | 243 | if( $ret_language !== $this->mMainLanguageCode ) { |
244 | 244 | global $wgOut, $wgUseXVO; |
245 | 245 | $wgOut->addVaryHeader( 'Accept-Language' ); |
246 | | - if( $wgUseXVO ) |
247 | | - $wgOut->addXVOHeader( 'Accept-Language' ); |
248 | | - |
| 246 | + if( $wgUseXVO ) { |
| 247 | + $aloption = array(); |
| 248 | + foreach( $this->mVariants as $variant ) { |
| 249 | + if($variant === $this->mMainLanguageCode) |
| 250 | + continue; |
| 251 | + $aloption[] = 'string-contains=' . $variant; |
| 252 | + } |
| 253 | + $wgOut->addXVOHeader( 'Accept-Language', $aloption ); |
| 254 | + } |
249 | 255 | } |
250 | 256 | return $ret_language; |
251 | 257 | } |