change gridview summary - the word 'item'

By default, GridView summary is "Showing 1-10 of 10 Items". I want to change the word "Items" to "Books". How can I do that ?

I try this

        $gridview = GridView::widget([

                'summary' => 'Showing <b>{begin}-{end}</b> of <b>{totalCount}</b> Books',

                'summaryOptions' => ['class' => 'summary'],

                'dataProvider' => $dataProvider,

it works. But is there a shorter way just to change the word ? I have to over-write the whole summary.

Second issue I have is ‘summaryOptions’ does not render <div class=‘summary’>…</div> wrap around the ‘summary’ as the default summary.

From looking at the class then you override the summary attribute, it doesn’t render it within a tag (which defaults to div). It simply formats and outputs the summary. You’ll have to include the div within the summary attribute value. It is a bit silly when you think about it, and perhaps a tad unintuitive to sometimes render within the tag and other times not to.

Perhaps you should raise an issue on Github ;)