Index: trunk/phase3/languages/LanguageConverter.php |
— | — | @@ -180,7 +180,8 @@ |
181 | 181 | $header = str_replace( '_', '-', strtolower($_SERVER["HTTP_ACCEPT_LANGUAGE"])); |
182 | 182 | $zh = strstr($header, $pv.'-'); |
183 | 183 | if($zh) { |
184 | | - $pv = substr($zh,0,5); |
| 184 | + $ary = split("[,;]",$zh); |
| 185 | + $pv = $ary[0]; |
185 | 186 | } |
186 | 187 | } |
187 | 188 | // don't try to return bad variant |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -197,6 +197,8 @@ |
198 | 198 | * (bug 15544) Wiki not set up message (NoLocalSettings.php) now works for |
199 | 199 | non-index.php entry pages (e.g. api.php). Patch by Matt Johnston. |
200 | 200 | * (bug 12284) Special:Preferences now sets a returnto parameter on the link to Special:Userlogin. Patch by Marooned. |
| 201 | +* Fixed the HTTP accept language string detection length in |
| 202 | + LanguageConverter.php, instead of the fixed length language codes. |
201 | 203 | |
202 | 204 | |
203 | 205 | === API changes in 1.14 === |