+ $s = Html::openElement( 'select', array( 'name' => 'limit' ) ) . "\n";
+ foreach ( $this->mLimitsShown as $key => $value ) {
+ # The pair is either $index => $limit, in which case the $value
+ # will be numeric, or $limit => $text, in which case the $value
+ # will be a string.
+ if( is_int( $value ) ){
+ $limit = $value;
+ $text = $wgLang->formatNum( $limit );
+ } else {
+ $limit = $key;
+ $text = $value;
+ }
+ $s .= Xml::option( $text, $limit, $limit == $this->mLimit ) . "\n";
+ }
+ $s .= Html::closeElement( 'select' );