2
我正在使用第三方组件(IPagedList
)来实现分页。一切正常,我只是需要本地化的消息例如IPagedList本地化
Showing items 11 through 11 of 11.
此消息文本是用PagedListRenderOptions.MinimalWithItemCountText
我正在使用第三方组件(IPagedList
)来实现分页。一切正常,我只是需要本地化的消息例如IPagedList本地化
Showing items 11 through 11 of 11.
此消息文本是用PagedListRenderOptions.MinimalWithItemCountText
使用下面的代码来设置自定义的本地化的格式生成:
var options = new PagedListRenderOptions();
options.PageCountAndCurrentLocationFormat = "Page {0} of {1}."; //your custom string goes gere
options.ItemSliceAndTotalFormat = "Showing items {0} through {1} of {2}.";
检查[这里]( https://github.com/TroyGoode/PagedList/blob/master/src/PagedList.Mvc/PagedListRenderOptions.cs) –