Skip to content

caijiajia-my/multi-language

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

laravel-admin Multi Language

Install

composer require laravel-admin-extensions-fixed/multi-language

Config

First, add extension config

In config/admin.php

    'extensions' => [
        'multi-language' => [
            'enable' => true,
            // the key should be same as var locale in config/app.php
            // the value is used to show
            'languages' => [
                'en' => 'English',
                'zh-CN' => '简体中文',
            ],
            // default locale
            'default' => 'zh-CN',
        ],
    ],

Then, add except route to auth

In config/admin.php, add locale to auth.excepts

    'auth' => [
        ...
        // The URIs that should be excluded from authorization.
        'excepts' => [
            'auth/login',
            'auth/logout',
            // add this line !
            'locale',
        ],
    ],

ScreenShots

login login1 language

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published