Index: trunk/phase3/includes/SpecialPreferences.php |
— | — | @@ -5,6 +5,9 @@ |
6 | 6 | * @subpackage SpecialPage |
7 | 7 | */ |
8 | 8 | |
| 9 | +/* to get a list of languages in setting user's language preference */ |
| 10 | +require_once("Names.php"); |
| 11 | + |
9 | 12 | /** |
10 | 13 | * Entry point that create the "Preferences" object |
11 | 14 | */ |
— | — | @@ -303,10 +306,13 @@ |
304 | 307 | /** |
305 | 308 | * @access private |
306 | 309 | */ |
| 310 | + |
307 | 311 | function mainPrefsForm( $err ) { |
308 | 312 | global $wgUser, $wgOut, $wgLang, $wgUseDynamicDates, $wgValidSkinNames; |
309 | 313 | global $wgAllowRealName, $wgImageLimits; |
310 | | - |
| 314 | + |
| 315 | + global $wgLanguageNames; |
| 316 | + |
311 | 317 | $wgOut->setPageTitle( wfMsg( 'preferences' ) ); |
312 | 318 | $wgOut->setArticleRelated( false ); |
313 | 319 | $wgOut->setRobotpolicy( 'noindex,nofollow' ); |
— | — | @@ -384,8 +390,14 @@ |
385 | 391 | <div><label>$yem: <input type='text' name=\"wpUserEmail\" value=\"{$this->mUserEmail}\" size='20' /></label></div> |
386 | 392 | <div><label><input type='checkbox' $emfc value=\"1\" name=\"wpEmailFlag\" /> $emf</label></div> |
387 | 393 | <div><label>$ynn: <input type='text' name=\"wpNick\" value=\"{$this->mNick}\" size='12' /></label></div> |
388 | | - <div><label>$yl: <input type='text' name=\"wpUserLanguage\" value=\"{$this->mUserLanguage}\" size='8' /></label></div>\n" ); |
| 394 | + <div><label>$yl: <select name=\"wpUserLanguage\" />\n"); |
389 | 395 | |
| 396 | + foreach($wgLanguageNames as $code => $name) { |
| 397 | + $sel = ($code == $this->mUserLanguage)? "selected" : ""; |
| 398 | + $wgOut->addHtml("\t<option value=\"$code\" $sel>$code - $name</option>\n"); |
| 399 | + } |
| 400 | + $wgOut->addHtml("</label></div>\n" ); |
| 401 | + |
390 | 402 | # Fields for changing password |
391 | 403 | # |
392 | 404 | $this->mOldpass = htmlspecialchars( $this->mOldpass ); |