- 通过 composer 安装语言包:
composer require "overtrue/laravel-lang:~3.0"
- 将项目文件 config/app.PHP 中的
Illuminate\Translation\TranslationServiceProvider::class 替换为 Overtrue\LaravelLang\TranslationServiceProvider::class
- 修改项目文件 config/app.php:
'locale' => 'en' 修改为 'locale' => 'zh-CN'
- 在 .env 文件中添加语言:
APP_LOCALE=zh-CN
- 在项目文件 bootstrap/app.php 中添加下面这行
$app->register(Overtrue\LaravelLang\TranslationServiceProvider::class);
初始化的laravel-admin框架,界面默认是英文,配置中文的步骤
相关推荐
评论 18
1
2
Its such as you read my mind! You seem to grasp a lot approximately this, like you wrote
the e-book in it or something. I think that you can do
with some % to power the message home a bit, but other than that, that is excellent blog.
An excellent read. I will certainly be back.
What’s up to all, how is all, I think every one is getting more from this web site, and your views are
fastidious in support of new visitors.
My partner and I stumbled over here coming from a different web page and thought I should check things out.
I like what I see so now i’m following you. Look forward to going over your web page repeatedly.