PHP code example of deepcode-tech / laravel-multi-language

1. Go to this page and download the library: Download deepcode-tech/laravel-multi-language 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/ */

    

deepcode-tech / laravel-multi-language example snippets


php artisan vendor:publish --provider="Deepcode\MultiLanguage\MultiLanguageServiceProvider"


    [
        'enable' => TRUE,
        'middleware'=> 'web',
        'providers' => [
            'default' => [
                'enable' => TRUE,
                'languages' => [
                    'en' => 'English',
                    'zh-CN' => '简体中文',
                ],
                // default locale
                'default' => 'en',
                'is_api' => FALSE,
                'path' => '/',
                'domain' => NULL,
            ],
        ],
    ]