PHP code example of folklore / locale

1. Go to this page and download the library: Download folklore/locale 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/ */

    

folklore / locale example snippets


\Folklore\LaravelLocale\LocaleServiceProvider::class,

Route::get('/fr', [
  'as' => 'home.fr',
  'locale' => 'fr',
  function()
  {
    return view('home');
  }
]);

Route::get('/fr/a-propos', [
  'as' => 'about.fr',
  function()
  {
    return view('home');
  }
]);
bash
$ php artisan vendor:publish --provider="Folklore\LaravelLocale\LocaleServiceProvider"

config/locale.php