laravel7中文语言包

1.安装扩展包

composer require "overtrue/laravel-lang:~3.0"

2.修改配置文件config/app.php

(1)

//Illuminate\Translation\TranslationServiceProvider::class, 此句替换为下面的
Overtrue\LaravelLang\TranslationServiceProvider::class,

(2)

'timezone' => 'Asia/Shanghai',
'locale' => 'zh-CN',

3.预览效果

laravel7中文语言包

上一篇:最小化自动安装的Centos7修改完整中文显示


下一篇:报错Missing message: “menu.xxx“ for locale: “zh-CN“