When setting \Illuminate\Pagination\Paginator::useBootstrapFive();
at the \App\Providers\AppServiceProvider
class, the links()
method generates the following text at the bottom left of the page:
Showing 1 to 10 of 13 results
How can we translate it into other languages?
CodePudding user response:
Solution
Add these translations:
- 'Showing'
- 'to'
- 'of'
- 'results'
Addendum
To customize the pagination views:
Customizing The Pagination View
However, the easiest way to customize the pagination views is by exporting them to your
resources/views/vendor
directory using thevendor:publish
command:
php artisan vendor:publish --tag=laravel-pagination
This command will place the views in your application's
resources/views/vendor/pagination
directory. Thetailwind.blade.php
file within this directory corresponds to the default pagination view. You may edit this file to modify the pagination HTML.
resources
|
└───views
|
└───vendor
|
│
└───pagination
bootstrap-4.blade.php
bootstrap-5.blade.php
default.blade.php
semantic-ui.blade.php
simple-bootstrap-4.blade.php
simple-bootstrap-5.blade.php
simple-default.blade.php
simple-tailwind.blade.php
tailwind.blade.php