Index: trunk/phase3/includes/api/ApiQueryAllmessages.php |
— | — | @@ -42,6 +42,13 @@ |
43 | 43 | public function execute() { |
44 | 44 | global $wgMessageCache; |
45 | 45 | $params = $this->extractRequestParams(); |
| 46 | + |
| 47 | + if(!is_null($params['lang'])) |
| 48 | + { |
| 49 | + global $wgLang; |
| 50 | + $wgLang = Language::factory($params['lang']); |
| 51 | + } |
| 52 | + |
46 | 53 | |
47 | 54 | //Determine which messages should we print |
48 | 55 | $messages_target = array(); |
— | — | @@ -93,6 +100,7 @@ |
94 | 101 | ApiBase :: PARAM_DFLT => '*', |
95 | 102 | ), |
96 | 103 | 'filter' => array(), |
| 104 | + 'lang' => null, |
97 | 105 | ); |
98 | 106 | } |
99 | 107 | |
— | — | @@ -100,6 +108,7 @@ |
101 | 109 | return array ( |
102 | 110 | 'messages' => 'Which messages to output. "*" means all messages', |
103 | 111 | 'filter' => 'Return only messages that contains specified string', |
| 112 | + 'lang' => 'Language code', |
104 | 113 | ); |
105 | 114 | } |
106 | 115 | |
— | — | @@ -110,7 +119,7 @@ |
111 | 120 | protected function getExamples() { |
112 | 121 | return array( |
113 | 122 | 'api.php?action=query&meta=allmessages&amfilter=ipb-', |
114 | | - 'api.php?action=query&meta=allmessages&ammessages=august|mainpage', |
| 123 | + 'api.php?action=query&meta=allmessages&ammessages=august|mainpage&amlang=de', |
115 | 124 | ); |
116 | 125 | } |
117 | 126 | |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -447,6 +447,7 @@ |
448 | 448 | * Added support for image thumbnailing to prop=imageinfo |
449 | 449 | * action={login,block,delete,move,protect,rollback,unblock,undelete} now must be POSTed |
450 | 450 | * prop=imageinfo interface changed: iihistory replaced by iilimit, iistart and iiend parameters |
| 451 | +* Added amlang parameter to meta=allmessages |
451 | 452 | |
452 | 453 | === Languages updated in 1.12 === |
453 | 454 | |