1. Go to this page and download the library: Download rohit/laravel-localization library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
return [
// Add any language you want to support and comes as prefix in the url
'all_locales' => [
'en',
'th'
],
'default_locale' => 'th', // Default locale will not be shown in the url
];